### Question:
MessagePackFactory extends JsonFactory { @Override public JsonGenerator createGenerator(OutputStream out, JsonEncoding enc) throws IOException { return new MessagePackGenerator(_generatorFeatures, _objectCodec, out, packerConfig, reuseResourceInGenerator); } MessagePackFactory();  MessagePackFactory(MessagePack.PackerConfig packerConfig);  MessagePackFactory(MessagePackFactory src); MessagePackFactory setReuseResourceInGenerator(boolean reuseResourceInGenerator); MessagePackFactory setReuseResourceInParser(boolean reuseResourceInParser); MessagePackFactory setExtTypeCustomDesers(ExtensionTypeCustomDeserializers extTypeCustomDesers); @Override JsonGenerator createGenerator(OutputStream out, JsonEncoding enc); @Override JsonGenerator createGenerator(File f, JsonEncoding enc); @Override JsonGenerator createGenerator(Writer w); @Override JsonParser createParser(byte[] data); @Override JsonParser createParser(InputStream in); @Override JsonFactory copy(); @Override String getFormatName();  }### Answer:
@Test public void testCreateGenerator() throws IOException { JsonEncoding enc = JsonEncoding.UTF8; JsonGenerator generator = factory.createGenerator(out, enc); assertEquals(MessagePackGenerator.class, generator.getClass()); }