diff --git a/src/test/java/org/cactoos/io/HeadOfTest.java b/src/test/java/org/cactoos/io/HeadOfTest.java index ae3f4c29a9..2b563c3d5c 100644 --- a/src/test/java/org/cactoos/io/HeadOfTest.java +++ b/src/test/java/org/cactoos/io/HeadOfTest.java @@ -51,6 +51,20 @@ public void readsHeadOfLongerInput() throws Exception { ).affirm(); } + @Test + public void readsEmptyHeadOfInput() throws Exception { + new Assertion<>( + "must limit to 0 the number of read bytes", + new TextOf( + new HeadOf( + new InputOf("readsEmptyHeadOfInput"), + 0 + ) + ), + new TextHasString("") + ).affirm(); + } + @Test public void readsHeadOfShorterInput() throws Exception { final String input = "readsHeadOfShorterInput";