@Test public void testSerializationWithoutBodyAndHeaders() throws IOException, URISyntaxException { SceneSerializer sceneSerializer = new SceneSerializer(); StringWriter stringWriter = new StringWriter(); sceneSerializer.serialize(MockDataGenerator.getMockSceneWithoutBodyAndHeader(), stringWriter); Assert.assertEquals(MockDataGenerator.getSerializedSceneWithoutBodyAndHeader(), stringWriter.toString()); }
public void serialize(Scene scene, Writer writer) throws IOException { _jsonGenerator = JSON_FACTORY.createGenerator(writer); _jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter()); _jsonGenerator.writeStartObject(); _jsonGenerator.writeStringField(SceneSerializationConstant.SCENE_TAG_NAME, scene.getName()); writeHttpExchanges(scene.getRecordedHttpExchangeList()); _jsonGenerator.writeEndObject(); _jsonGenerator.close(); }
SceneSerializer { public void serialize(Scene scene, Writer writer) throws IOException { _jsonGenerator = JSON_FACTORY.createGenerator(writer); _jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter()); _jsonGenerator.writeStartObject(); _jsonGenerator.writeStringField(SceneSerializationConstant.SCENE_TAG_NAME, scene.getName()); writeHttpExchanges(scene.getRecordedHttpExchangeList()); _jsonGenerator.writeEndObject(); _jsonGenerator.close(); } }
SceneSerializer { public void serialize(Scene scene, Writer writer) throws IOException { _jsonGenerator = JSON_FACTORY.createGenerator(writer); _jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter()); _jsonGenerator.writeStartObject(); _jsonGenerator.writeStringField(SceneSerializationConstant.SCENE_TAG_NAME, scene.getName()); writeHttpExchanges(scene.getRecordedHttpExchangeList()); _jsonGenerator.writeEndObject(); _jsonGenerator.close(); }  }
SceneSerializer { public void serialize(Scene scene, Writer writer) throws IOException { _jsonGenerator = JSON_FACTORY.createGenerator(writer); _jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter()); _jsonGenerator.writeStartObject(); _jsonGenerator.writeStringField(SceneSerializationConstant.SCENE_TAG_NAME, scene.getName()); writeHttpExchanges(scene.getRecordedHttpExchangeList()); _jsonGenerator.writeEndObject(); _jsonGenerator.close(); }  void serialize(Scene scene, Writer writer); }
SceneSerializer { public void serialize(Scene scene, Writer writer) throws IOException { _jsonGenerator = JSON_FACTORY.createGenerator(writer); _jsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter()); _jsonGenerator.writeStartObject(); _jsonGenerator.writeStringField(SceneSerializationConstant.SCENE_TAG_NAME, scene.getName()); writeHttpExchanges(scene.getRecordedHttpExchangeList()); _jsonGenerator.writeEndObject(); _jsonGenerator.close(); }  void serialize(Scene scene, Writer writer);  }