### Question:
AltNamesConverter implements Converter { @Override public String jsonToTinkerpop(JsonNode json) throws IOException { ObjectNode dbJson = jsnO("list", json); objectMapper.treeToValue(dbJson, AltNames.class); return dbJson.toString(); }  @Override String jsonToTinkerpop(JsonNode json); @Override JsonNode tinkerpopToJson(Object value); @Override String getGuiTypeId(); @Override String getUniqueTypeIdentifier();  }### Answer:
@Test public void jsonToTinkerpopConvertsASerializedAltNamesValuesToADbSerializedAsString() throws Exception { ObjectMapper objectMapper = new ObjectMapper(); JsonNode jsonNode = objectMapper.valueToTree(Lists.newArrayList(ALT_NAME_1, ALT_NAME_2)); String value = instance.jsonToTinkerpop(jsonNode); AltNames altNamesValue = objectMapper.readValue(value, AltNames.class); assertThat(altNamesValue.list, containsInAnyOrder(ALT_NAME_1, ALT_NAME_2)); }
@Test(expected = IOException.class) public void jsonToTinkerpopThrowsAnIoExceptionIfTheValueCannotBeConvertedToAltNames() throws Exception { JsonNode bogusInput = new ObjectMapper().createObjectNode(); instance.jsonToTinkerpop(bogusInput); }