@Test(expected = InternalErrorException.class) public void failedDeserializeJsonNode() throws IOException { ObjectMapper mockBadMapper = mock(ObjectMapper.class); when(mockBadMapper.readTree(anyString())).thenThrow(new IOException()); test = new IngestionSerializer(mockBadMapper); test.deserialize(TestConstants.CUSTOMER_INGESTION_PAYLOAD); }
public JsonNode deserialize(@NonNull final String input){ try { return mapper.readTree(input); } catch (IOException e) { throw new InternalErrorException(CustomerMessage.INTERNAL_ERROR, e); } }
IngestionSerializer implements ComprehendSerializer<JsonNode> { public JsonNode deserialize(@NonNull final String input){ try { return mapper.readTree(input); } catch (IOException e) { throw new InternalErrorException(CustomerMessage.INTERNAL_ERROR, e); } } }
IngestionSerializer implements ComprehendSerializer<JsonNode> { public JsonNode deserialize(@NonNull final String input){ try { return mapper.readTree(input); } catch (IOException e) { throw new InternalErrorException(CustomerMessage.INTERNAL_ERROR, e); } }  }
IngestionSerializer implements ComprehendSerializer<JsonNode> { public JsonNode deserialize(@NonNull final String input){ try { return mapper.readTree(input); } catch (IOException e) { throw new InternalErrorException(CustomerMessage.INTERNAL_ERROR, e); } }  JsonNode deserialize(@NonNull final String input); String serialize(@NonNull final JsonNode input); }
IngestionSerializer implements ComprehendSerializer<JsonNode> { public JsonNode deserialize(@NonNull final String input){ try { return mapper.readTree(input); } catch (IOException e) { throw new InternalErrorException(CustomerMessage.INTERNAL_ERROR, e); } }  JsonNode deserialize(@NonNull final String input); String serialize(@NonNull final JsonNode input);  }