@Test public void testConvertToString() throws JsonProcessingException { val someObj = Collections.singletonMap("foo", "bar"); val expected = new ObjectMapper().writeValueAsString(someObj); val actual = utilUnderTest.convertToString(someObj); assertEquals(expected, actual); }
public String convertToString(Object object) { try { return objectMapper.writeValueAsString(object); } catch (JsonProcessingException e) { throw new RuntimeException("JSON serialization to String failed", e); } }
ObjectMapperUtil { public String convertToString(Object object) { try { return objectMapper.writeValueAsString(object); } catch (JsonProcessingException e) { throw new RuntimeException("JSON serialization to String failed", e); } } }
ObjectMapperUtil { public String convertToString(Object object) { try { return objectMapper.writeValueAsString(object); } catch (JsonProcessingException e) { throw new RuntimeException("JSON serialization to String failed", e); } }  }
ObjectMapperUtil { public String convertToString(Object object) { try { return objectMapper.writeValueAsString(object); } catch (JsonProcessingException e) { throw new RuntimeException("JSON serialization to String failed", e); } }  String convertToString(Object object); Object convertToObject(String data, TypeReference c); }
ObjectMapperUtil { public String convertToString(Object object) { try { return objectMapper.writeValueAsString(object); } catch (JsonProcessingException e) { throw new RuntimeException("JSON serialization to String failed", e); } }  String convertToString(Object object); Object convertToObject(String data, TypeReference c);  }