diff --git a/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java b/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java index 5a5d0d4..78d2c28 100644 --- a/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java +++ b/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java @@ -52,7 +52,6 @@ */ @MojoTest public class CleanMojoTest { - private static final String LOCAL_REPO = "target/local-repo/"; /** * Tests the simple removal of directories @@ -175,7 +174,7 @@ public void testCleanLockedFile(CleanMojo mojo) throws Exception { mojo.execute(); fail("Should fail to delete a file that is locked"); } catch (MojoException expected) { - assertTrue(true); + assertNotNull(expected.getMessage()); } } @@ -199,9 +198,6 @@ public void testCleanLockedFileWithNoError(CleanMojo mojo) throws Exception { try (FileChannel channel = new RandomAccessFile(f, "rw").getChannel(); FileLock ignored = channel.lock()) { mojo.execute(); - assertTrue(true); - } catch (MojoException expected) { - fail("Should display a warning when deleting a file that is locked"); } }