### Question:
JsonGenerator { public static String generateJson(ResourceBaseDTO<?> resourceBaseDTO) throws JsonProcessingException { return generateJson(resourceBaseDTO, false); } private  JsonGenerator(); static String generateJson(ResourceBaseDTO<?> resourceBaseDTO);  }### Answer:
@Test public void generateJsonTest() throws JsonProcessingException { ReuploadKeyDTO dto = new ReuploadKeyDTO(); dto.withContent("someContent").withId("someId").withEdgeUserName("edgeUserName").withServiceBaseName("SBN"); String actual = JsonGenerator.generateJson(dto); String expected = "{\"@class\":\"com.epam.dlab.dto.reuploadkey.ReuploadKeyDTO\",\"content\":\"someContent\"," + "\"id\":\"someId\",\"edge_user_name\":\"edgeUserName\",\"conf_service_base_name\":\"SBN\"}"; Assert.assertEquals(expected, actual); }