DefaultHttpJsonResponse implements HttpJsonResponse { @Override @SuppressWarnings("unchecked") public Map<String, String> asProperties() throws IOException { return as(Map.class, STRING_MAP_TYPE); } protected  DefaultHttpJsonResponse(String response, int responseCode); protected  DefaultHttpJsonResponse(
      String response, int responseCode, Map<String, List<String>> headers); @Override String asString(); @Override T asDto(Class<T> dtoInterface); @Override List<T> asList(Class<T> dtoInterface); @Override @SuppressWarnings("unchecked") Map<String, String> asProperties(); @Override T as(Class<T> clazz, Type genericType); @Override Map<String, List<String>> getHeaders(); @Override int getResponseCode();  }
@Test public void shouldBeAbleToRequestProperties() throws Exception { final String responseBody = DtoFactory.getInstance().toJson(new JsonStringMapImpl<>(singletonMap("key", "value"))); final DefaultHttpJsonResponse response = new DefaultHttpJsonResponse(responseBody, 200); assertEquals(response.asProperties(), singletonMap("key", "value")); }