3131import static com .github .dockerjava .test .serdes .JSONTestHelper .testRoundTrip ;
3232import static org .hamcrest .MatcherAssert .assertThat ;
3333import static org .hamcrest .Matchers .containsString ;
34+ import static org .hamcrest .Matchers .emptyString ;
3435import static org .hamcrest .Matchers .equalTo ;
3536import static org .hamcrest .Matchers .is ;
36- import static org .hamcrest .Matchers .isEmptyString ;
3737import static org .hamcrest .Matchers .notNullValue ;
3838import static org .hamcrest .Matchers .nullValue ;
3939import static org .hamcrest .core .IsNot .not ;
@@ -51,7 +51,7 @@ public class InspectContainerResponseTest {
5151 @ Test
5252 public void roundTrip_full () throws IOException {
5353 InspectContainerResponse [] responses = testRoundTrip (CommandJSONSamples .inspectContainerResponse_full ,
54- InspectContainerResponse [].class );
54+ InspectContainerResponse [].class );
5555 assertEquals (1 , responses .length );
5656 final InspectContainerResponse response = responses [0 ];
5757
@@ -72,10 +72,10 @@ public void roundTrip_full_healthcheck() throws IOException {
7272 final JavaType type = JSONTestHelper .getMapper ().getTypeFactory ().constructType (InspectContainerResponse .class );
7373
7474 final InspectContainerResponse response = testRoundTrip (RemoteApiVersion .VERSION_1_24 ,
75- "/containers/inspect/1.json" ,
76- type
75+ "/containers/inspect/1.json" ,
76+ type
7777 );
78-
78+
7979 assertEquals (response .getState ().getHealth ().getStatus (), "healthy" );
8080 assertEquals (response .getState ().getHealth ().getFailingStreak (), new Integer (0 ));
8181 assertEquals (response .getState ().getHealth ().getLog ().size (), 2 );
@@ -86,7 +86,7 @@ public void roundTrip_full_healthcheck() throws IOException {
8686 @ Test
8787 public void roundTrip_1_21_full () throws IOException {
8888 InspectContainerResponse [] responses = testRoundTrip (CommandJSONSamples .inspectContainerResponse_full_1_21 ,
89- InspectContainerResponse [].class );
89+ InspectContainerResponse [].class );
9090 assertEquals (1 , responses .length );
9191 final InspectContainerResponse response = responses [0 ];
9292 final InspectContainerResponse .ContainerState state = response .getState ();
@@ -96,13 +96,13 @@ public void roundTrip_1_21_full() throws IOException {
9696 assertThat (state .getStatus (), containsString ("running" ));
9797 assertFalse (state .getRestarting ());
9898 assertFalse (state .getOOMKilled ());
99- assertThat (state .getError (), isEmptyString ( ));
99+ assertThat (state .getError (), is ( emptyString () ));
100100 }
101101
102102 @ Test
103103 public void roundTrip_1_26a_full () throws IOException {
104104 InspectContainerResponse [] responses = testRoundTrip (CommandJSONSamples .inspectContainerResponse_full_1_26a ,
105- InspectContainerResponse [].class );
105+ InspectContainerResponse [].class );
106106
107107 assertEquals (1 , responses .length );
108108 final InspectContainerResponse response = responses [0 ];
@@ -118,7 +118,7 @@ public void roundTrip_1_26a_full() throws IOException {
118118 @ Test
119119 public void roundTrip_1_26b_full () throws IOException {
120120 InspectContainerResponse [] responses = testRoundTrip (CommandJSONSamples .inspectContainerResponse_full_1_26b ,
121- InspectContainerResponse [].class );
121+ InspectContainerResponse [].class );
122122
123123 assertEquals (1 , responses .length );
124124 final InspectContainerResponse response = responses [0 ];
@@ -142,8 +142,8 @@ public void inspect_windows_container() throws IOException {
142142 final JavaType type = JSONTestHelper .getMapper ().getTypeFactory ().constructType (InspectContainerResponse .class );
143143
144144 final InspectContainerResponse response = testRoundTrip (RemoteApiVersion .VERSION_1_38 ,
145- "/containers/inspect/lcow.json" ,
146- type
145+ "/containers/inspect/lcow.json" ,
146+ type
147147 );
148148
149149 assertThat (response , notNullValue ());
@@ -157,31 +157,31 @@ public void inspect_windows_container() throws IOException {
157157 assertThat (response .getGraphDriver (), notNullValue ());
158158 assertThat (response .getGraphDriver ().getName (), is ("windowsfilter" ));
159159 assertThat (response .getGraphDriver ().getData (), is (new GraphData ().withDir (
160- "C:\\ ProgramData\\ Docker\\ windowsfilter\\ 35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556"
160+ "C:\\ ProgramData\\ Docker\\ windowsfilter\\ 35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556"
161161 )));
162162
163163 assertThat (response .getHostConfig (), notNullValue ());
164164 assertThat (response .getHostConfig ().getIsolation (), is (Isolation .HYPERV ));
165165
166166 assertThat (response .getImageId (), is ("sha256:1381511ec0122f197b6abff5bc0692bef19943ddafd6680eff41197afa3a6dda" ));
167167 assertThat (response .getLogPath (), is (
168- "C:\\ ProgramData\\ Docker\\ containers\\ 35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556" +
169- "\\ 35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556-json.log"
168+ "C:\\ ProgramData\\ Docker\\ containers\\ 35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556" +
169+ "\\ 35da02ca897bd378ee52be3066c847fee396ba1a28a00b4be36f42c6686bf556-json.log"
170170 ));
171171 assertThat (response .getName (), is ("/cranky_clarke" ));
172172
173173 assertThat (response .getNetworkSettings (), notNullValue ());
174174 assertThat (response .getNetworkSettings ().getNetworks (), is (Collections .singletonMap ("nat" ,
175- new ContainerNetwork ()
176- .withEndpointId ("493b77d6fe7e3b92435b1eb01461fde669781330deb84a9cbada360db8997ebc" )
177- .withGateway ("172.17.18.1" )
178- .withGlobalIPv6Address ("" )
179- .withGlobalIPv6PrefixLen (0 )
180- .withIpv4Address ("172.17.18.123" )
181- .withIpPrefixLen (16 )
182- .withIpV6Gateway ("" )
183- .withMacAddress ("00:aa:ff:cf:dd:09" )
184- .withNetworkID ("398c0e206dd677ed4a6566f9de458311f5767d8c7a8b963275490ab64c5d10a7" )
175+ new ContainerNetwork ()
176+ .withEndpointId ("493b77d6fe7e3b92435b1eb01461fde669781330deb84a9cbada360db8997ebc" )
177+ .withGateway ("172.17.18.1" )
178+ .withGlobalIPv6Address ("" )
179+ .withGlobalIPv6PrefixLen (0 )
180+ .withIpv4Address ("172.17.18.123" )
181+ .withIpPrefixLen (16 )
182+ .withIpV6Gateway ("" )
183+ .withMacAddress ("00:aa:ff:cf:dd:09" )
184+ .withNetworkID ("398c0e206dd677ed4a6566f9de458311f5767d8c7a8b963275490ab64c5d10a7" )
185185 )));
186186
187187 assertThat (response .getPath (), is ("cmd" ));
0 commit comments