### Question:
JsonMapConverter implements AttributeConverter<Map<String, Object>, String> { @Override @SuppressWarnings("unchecked") public Map<String, Object> convertToEntityAttribute(final String str) { if (str == null || str.isEmpty()) { return null; } try { return Json.getObjectMapper().readValue(str, Map.class); } catch (final IOException ex) { throw new MinijaxException(ex.getMessage(), ex); } }  @Override String convertToDatabaseColumn(final Map<String, Object> map); @Override @SuppressWarnings("unchecked") Map<String, Object> convertToEntityAttribute(final String str);  }### Answer:
@Test public void testEmptyString() { final JsonMapConverter c = new JsonMapConverter(); assertNull(c.convertToEntityAttribute("")); }
@Test(expected = MinijaxException.class) public void testInvalidJsonParse() { final JsonMapConverter c = new JsonMapConverter(); c.convertToEntityAttribute("{"); }