RoadReader implements ModelReader<Road> { @Override public Road read(JsonNode json) { try { return reader.readValue(json); } catch (IOException e) { throw new UncheckedIOException(e); } } RoadReader(); @VisibleForTesting  RoadReader(ObjectMapper objectMapper); @Override Road read(JsonNode json);  }
@Test public void defaultConstructor() { RoadReader underTest = new RoadReader(); assertThat(underTest.read(emptyNode), is(road)); }
@Test(expected = UncheckedIOException.class) public void readFails() throws Exception { when(reader.readValue(emptyNode)).thenThrow(jsonProcessingException); underTest.read(emptyNode); }