diff --git a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java index dd78b49dd..8a626b2df 100644 --- a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java @@ -622,13 +622,13 @@ public class DurationFormatUtilsTest extends AbstractLangTest { final DurationFormatUtils.Token token = createTokenWithCount(DurationFormatUtils.y, 4); assertEquals(token, token); assertEquals(token.hashCode(), token.hashCode()); - assertNotEquals(token, new Object(), "Token equal to non-Token class. "); + assertNotEquals(token, new Object(), "Token equal to non-Token class."); final Token token2 = createTokenWithCount("", 1); - assertNotEquals(token, token2, "Token equal to Token with wrong value class. "); + assertNotEquals(token, token2, "Token equal to Token with wrong value class."); assertNotEquals(token.hashCode(), token2.hashCode()); - assertNotEquals(token, createTokenWithCount(DurationFormatUtils.y, 1), "Token equal to Token with different count. "); + assertNotEquals(token, createTokenWithCount(DurationFormatUtils.y, 1), "Token equal to Token with different count."); final DurationFormatUtils.Token numToken = createTokenWithCount("1", 4); - assertEquals(numToken, numToken, "Token with Number value not equal to itself. "); + assertEquals(numToken, numToken, "Token with Number value not equal to itself."); } @Test diff --git a/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java b/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java index 48f06ed44..e0b94dee6 100644 --- a/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java +++ b/src/test/java/org/apache/commons/lang3/time/StopWatchTest.java @@ -98,31 +98,19 @@ public class StopWatchTest extends AbstractLangTest { @Test public void testBadStates() { final StopWatch watch = new StopWatch(); - assertThrows(IllegalStateException.class, watch::stop, "Calling stop on an unstarted StopWatch should throw an exception. "); - - assertThrows(IllegalStateException.class, watch::suspend, "Calling suspend on an unstarted StopWatch should throw an exception. "); - - assertThrows(IllegalStateException.class, watch::split, "Calling split on a non-running StopWatch should throw an exception. "); - - assertThrows(IllegalStateException.class, watch::unsplit, "Calling unsplit on an unsplit StopWatch should throw an exception. "); - - assertThrows(IllegalStateException.class, watch::resume, "Calling resume on an unsuspended StopWatch should throw an exception. "); - + assertThrows(IllegalStateException.class, watch::stop, "Calling stop on an unstarted StopWatch should throw an exception."); + assertThrows(IllegalStateException.class, watch::suspend, "Calling suspend on an unstarted StopWatch should throw an exception."); + assertThrows(IllegalStateException.class, watch::split, "Calling split on a non-running StopWatch should throw an exception."); + assertThrows(IllegalStateException.class, watch::unsplit, "Calling unsplit on an unsplit StopWatch should throw an exception."); + assertThrows(IllegalStateException.class, watch::resume, "Calling resume on an unsuspended StopWatch should throw an exception."); watch.start(); - - assertThrows(IllegalStateException.class, watch::start, "Calling start on a started StopWatch should throw an exception. "); - - assertThrows(IllegalStateException.class, watch::unsplit, "Calling unsplit on an unsplit StopWatch should throw an exception. "); - - assertThrows(IllegalStateException.class, watch::getSplitTime, "Calling getSplitTime on an unsplit StopWatch should throw an exception. "); - - assertThrows(IllegalStateException.class, watch::getSplitDuration, "Calling getSplitTime on an unsplit StopWatch should throw an exception. "); - - assertThrows(IllegalStateException.class, watch::resume, "Calling resume on an unsuspended StopWatch should throw an exception. "); - + assertThrows(IllegalStateException.class, watch::start, "Calling start on a started StopWatch should throw an exception."); + assertThrows(IllegalStateException.class, watch::unsplit, "Calling unsplit on an unsplit StopWatch should throw an exception."); + assertThrows(IllegalStateException.class, watch::getSplitTime, "Calling getSplitTime on an unsplit StopWatch should throw an exception."); + assertThrows(IllegalStateException.class, watch::getSplitDuration, "Calling getSplitTime on an unsplit StopWatch should throw an exception."); + assertThrows(IllegalStateException.class, watch::resume, "Calling resume on an unsuspended StopWatch should throw an exception."); watch.stop(); - - assertThrows(IllegalStateException.class, watch::start, "Calling start on a stopped StopWatch should throw an exception as it needs to be reset. "); + assertThrows(IllegalStateException.class, watch::start, "Calling start on a stopped StopWatch should throw an exception as it needs to be reset."); } @Test