@Test
public void createGeneratorCallsReturnSameInstanceEveryTime() throws IOException {

    // given
    SingleThreadJsonFactory factory = new SingleThreadJsonFactory();
    // when
    JsonGenerator generator1 = factory.createGenerator(mock(OutputStream.class), JsonEncoding.UTF8);
    JsonGenerator generator2 = factory.createGenerator(mock(OutputStream.class), JsonEncoding.UTF8);
    // then
    assertNotNull(generator1);
    assertSame(generator1, generator2);
}