### Question:
SingleThreadJsonFactory extends JsonFactory { @Override public SingleThreadJsonFactory copy() { _checkInvalidCopy(SingleThreadJsonFactory.class); return new SingleThreadJsonFactory(this, null); } 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 copyDoesNotUseSourceSharedComponents() { SingleThreadJsonFactory factory1 = new SingleThreadJsonFactory(); factory1.dataOutputDelegate.setDelegate(mock(DataOutput.class)); SingleThreadJsonFactory factory2 = factory1.copy(); assertNotSame(factory1.outputStreamDelegate, factory2.outputStreamDelegate); assertNotSame(factory1.outputStreamDelegate.getDelegate(), factory2.outputStreamDelegate.getDelegate()); assertNotSame(factory1.dataOutputDelegate, factory2.dataOutputDelegate); assertNotSame(factory1.dataOutputDelegate.getDelegate(), factory2.dataOutputDelegate.getDelegate()); assertNotSame(factory1.ioContext, factory2.ioContext); assertNotSame(factory1.ioContext.getSourceReference(), factory2.ioContext.getSourceReference()); assertNotSame(factory1.jsonGenerator, factory2.jsonGenerator); assertNotSame(factory1.writeCtxAccessor, factory2.writeCtxAccessor); }