diff --git a/src/test/java/hudson/tasks/AntJCasCCompatibilityTest.java b/src/test/java/hudson/tasks/AntJCasCCompatibilityTest.java index a50bc93..2af654a 100644 --- a/src/test/java/hudson/tasks/AntJCasCCompatibilityTest.java +++ b/src/test/java/hudson/tasks/AntJCasCCompatibilityTest.java @@ -6,7 +6,7 @@ import org.jvnet.hudson.test.RestartableJenkinsRule; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertNotNull; public class AntJCasCCompatibilityTest extends RoundTripAbstractTest { @@ -15,7 +15,7 @@ protected void assertConfiguredAsExpected(RestartableJenkinsRule restartableJenk final Jenkins jenkins = restartableJenkinsRule.j.jenkins; final Ant.DescriptorImpl descriptor = (Ant.DescriptorImpl) jenkins.getDescriptor(Ant.class); - assertTrue("The descriptor should not be null", descriptor != null); + assertNotNull("The descriptor should not be null", descriptor); final Ant.AntInstallation[] installations = descriptor.getInstallations(); assertEquals("The installation has not retrieved", 2, installations.length); diff --git a/src/test/java/hudson/tasks/AntTest.java b/src/test/java/hudson/tasks/AntTest.java index e8009ef..194dcca 100644 --- a/src/test/java/hudson/tasks/AntTest.java +++ b/src/test/java/hudson/tasks/AntTest.java @@ -60,8 +60,15 @@ import java.util.Set; import org.apache.commons.lang.SystemUtils; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.not; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeTrue;