RulesObjectMapper { public <T extends Object> T toObject(String json, Class<T> clazz) { try { return mapper.readValue(json, clazz); } catch (Exception e) { log.error("Error parsing JSON from rules into: " + clazz.getName(), e); log.error(json); throw new IseException("Unable to build object from JSON.", e); } } @Inject @SuppressWarnings("checkstyle:indentation")  RulesObjectMapper(ProductCachedSerializationModule poolCachedSerializationModule); String toJsonString(Map<String, Object> toSerialize); T toObject(String json, Class<T> clazz); T toObject(String json, TypeReference<T> typeref); String toJsonString(Object entity);  }
@Test public void testComplianceStatusWithSourceConsumerInEnv() { InputStream is = this.getClass().getResourceAsStream("/json/compliancestatus-with-env.json"); String json = Util.readFile(is); ComplianceStatus cs = objMapper.toObject(json, ComplianceStatus.class); }
@Test public void testComplianceStatusWithSourceConsumerInEnvV2() { InputStream is = this.getClass().getResourceAsStream("/json/compliancestatus-with-env-v2.json"); String json = Util.readFile(is); ComplianceStatus cs = objMapper.toObject(json, ComplianceStatus.class); }