@Test(expected = IllegalArgumentException.class) public void testInvalidJsonGetIllegalArgument() { FeatureJsonParser.parseFeature("something:invald"); }
@SuppressWarnings("unchecked") public static Feature parseFeature(String json) { try { return parseFeatureMap(objectMapper.readValue(json, HashMap.class)); } catch (IOException e) { throw new IllegalArgumentException("Cannot parse json as Feature " + json, e); } }
FeatureJsonParser { @SuppressWarnings("unchecked") public static Feature parseFeature(String json) { try { return parseFeatureMap(objectMapper.readValue(json, HashMap.class)); } catch (IOException e) { throw new IllegalArgumentException("Cannot parse json as Feature " + json, e); } } }
FeatureJsonParser { @SuppressWarnings("unchecked") public static Feature parseFeature(String json) { try { return parseFeatureMap(objectMapper.readValue(json, HashMap.class)); } catch (IOException e) { throw new IllegalArgumentException("Cannot parse json as Feature " + json, e); } } private  FeatureJsonParser(); }
FeatureJsonParser { @SuppressWarnings("unchecked") public static Feature parseFeature(String json) { try { return parseFeatureMap(objectMapper.readValue(json, HashMap.class)); } catch (IOException e) { throw new IllegalArgumentException("Cannot parse json as Feature " + json, e); } } private  FeatureJsonParser(); @SuppressWarnings("unchecked") static Feature parseFeature(String json); @SuppressWarnings("unchecked") static Set<String> parsePermissions(String json); static String featureArrayToJson(Feature[] features); @SuppressWarnings("unchecked") static FlippingStrategy parseFlipStrategyAsJson(String uid, String json); @SuppressWarnings("unchecked") static FlippingStrategy parseFlipStrategy(String uid, Map<String, Object> flipMap); @SuppressWarnings("unchecked") static Feature[] parseFeatureArray(String json); }
FeatureJsonParser { @SuppressWarnings("unchecked") public static Feature parseFeature(String json) { try { return parseFeatureMap(objectMapper.readValue(json, HashMap.class)); } catch (IOException e) { throw new IllegalArgumentException("Cannot parse json as Feature " + json, e); } } private  FeatureJsonParser(); @SuppressWarnings("unchecked") static Feature parseFeature(String json); @SuppressWarnings("unchecked") static Set<String> parsePermissions(String json); static String featureArrayToJson(Feature[] features); @SuppressWarnings("unchecked") static FlippingStrategy parseFlipStrategyAsJson(String uid, String json); @SuppressWarnings("unchecked") static FlippingStrategy parseFlipStrategy(String uid, Map<String, Object> flipMap); @SuppressWarnings("unchecked") static Feature[] parseFeatureArray(String json);  }