### Question:
JacksonSerializer { public String serialize(Object obj) throws JsonGenerationException, JsonMappingException, IOException { try{ return mapper.writeValueAsString(obj); }catch(Throwable e){ e.printStackTrace(); throw new RuntimeException(e); } }  String serialize(Object obj);  }### Answer:
@Test public void testSerialize() throws Exception { JacksonSerializer serializer = new JacksonSerializer(); ProfileImportStatusMessageFake message = new ProfileImportStatusMessageFake("profile1", "repalce"); message.addError("Organization: skks"); message.addError("Page: page1"); String serialize = serializer.serialize(message); assertThat(serialize).isEqualTo("{\"errors\":[\"Organization: skks\",\"Page: page1\"],\"profielName\":\"profile1\"}"); }