@Test
public void shouldCreateLongFromInputStreamContainingUtf8EncodingOfStringWithLong() throws Exception {

    assertThat(factory.create(new ByteArrayInputStream("0".getBytes("UTF-8"))), is(0l));
    assertThat(factory.create(new ByteArrayInputStream("10".getBytes("UTF-8"))), is(10l));
    assertThat(factory.create(new ByteArrayInputStream("-103".getBytes("UTF-8"))), is(-103l));
    assertThat(factory.create(new ByteArrayInputStream("1003044".getBytes("UTF-8"))), is(1003044l));
}