@Test(expected = IOException.class) public void tinkerpopToJsonThrowsAnIoExceptionWhenTheValueCannotBeParsed() throws Exception { String dbValue = ""; instance.tinkerpopToJson(dbValue); }
@Override public JsonNode tinkerpopToJson(Object value) throws IOException { if (value instanceof String && !isBlank((String) value)) { JsonNode json = objectMapper.readTree((String) value); objectMapper.treeToValue(json, AltNames.class); return json.get("list"); } else { throw new IOException("must be a json value serialised as String"); } }
AltNamesConverter implements Converter { @Override public JsonNode tinkerpopToJson(Object value) throws IOException { if (value instanceof String && !isBlank((String) value)) { JsonNode json = objectMapper.readTree((String) value); objectMapper.treeToValue(json, AltNames.class); return json.get("list"); } else { throw new IOException("must be a json value serialised as String"); } } }
AltNamesConverter implements Converter { @Override public JsonNode tinkerpopToJson(Object value) throws IOException { if (value instanceof String && !isBlank((String) value)) { JsonNode json = objectMapper.readTree((String) value); objectMapper.treeToValue(json, AltNames.class); return json.get("list"); } else { throw new IOException("must be a json value serialised as String"); } }  }
AltNamesConverter implements Converter { @Override public JsonNode tinkerpopToJson(Object value) throws IOException { if (value instanceof String && !isBlank((String) value)) { JsonNode json = objectMapper.readTree((String) value); objectMapper.treeToValue(json, AltNames.class); return json.get("list"); } else { throw new IOException("must be a json value serialised as String"); } }  @Override String jsonToTinkerpop(JsonNode json); @Override JsonNode tinkerpopToJson(Object value); @Override String getGuiTypeId(); @Override String getUniqueTypeIdentifier(); }
AltNamesConverter implements Converter { @Override public JsonNode tinkerpopToJson(Object value) throws IOException { if (value instanceof String && !isBlank((String) value)) { JsonNode json = objectMapper.readTree((String) value); objectMapper.treeToValue(json, AltNames.class); return json.get("list"); } else { throw new IOException("must be a json value serialised as String"); } }  @Override String jsonToTinkerpop(JsonNode json); @Override JsonNode tinkerpopToJson(Object value); @Override String getGuiTypeId(); @Override String getUniqueTypeIdentifier();  }