### Question:
SingleThreadJsonFactory extends JsonFactory { @Override protected JsonGenerator _createUTF8Generator(OutputStream out, IOContext ctxt) { outputStreamDelegate.setDelegate(out); ioContext.setSourceReference(out); return jsonGenerator.reset(); } SingleThreadJsonFactory();  SingleThreadJsonFactory(SingleThreadJsonFactory factory, ObjectCodec codec); @Override JsonGenerator createGenerator(Writer w); @Override JsonGenerator createGenerator(File f, JsonEncoding enc); @Override JsonGenerator createGenerator(OutputStream out, JsonEncoding enc); @Override final JsonFactory setCharacterEscapes(CharacterEscapes esc); @Override JsonFactory setRootValueSeparator(String sep); @Override SingleThreadJsonFactory copy();  }### Answer:
@Test public void _createUTF8GeneratorResetsDelegatesAndGenerator() { SingleThreadJsonFactory factory = new SingleThreadJsonFactory(); OutputStream os1 = mock(OutputStream.class); factory._createUTF8Generator(os1, mock(IOContext.class)); assertSame(factory.outputStreamDelegate.getDelegate(), os1); assertSame(factory.ioContext.getSourceReference(), os1); }