diff --git a/src/test/java/org/cactoos/bytes/HexOfTest.java b/src/test/java/org/cactoos/bytes/HexOfTest.java index 6af634228..0175776c8 100644 --- a/src/test/java/org/cactoos/bytes/HexOfTest.java +++ b/src/test/java/org/cactoos/bytes/HexOfTest.java @@ -68,19 +68,27 @@ public void validHex() throws Exception { ).affirm(); } + @Test public void invalidHexLength() throws Exception { new Assertion<>( "Must invalid hex length", () -> new HexOf(new TextOf("ABF")).asBytes(), - new Throws<>(IOException.class) + new Throws<>( + "Length of hexadecimal text is odd", + IOException.class + ) ).affirm(); } + @Test public void invalidHex() throws Exception { new Assertion<>( "Must invalid hex", () -> new HexOf(new TextOf("ABG!")).asBytes(), - new Throws<>(IOException.class) + new Throws<>( + "Unexpected character 'G'", + IOException.class + ) ).affirm(); } }