### Question:
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);  }### Answer:
@Test public void testMarshaling() throws Exception { Map <String, Feature> features = ff4j.getFeatures(); for (String key : features.keySet()) { assertMarshalling(features.get(key)); Feature f1 = FeatureJsonParser.parseFeature(features.get(key).toJson()); assertMarshalling(f1); } }
@Test(expected = IllegalArgumentException.class) public void testInvalidJsonGetIllegalArgument() { FeatureJsonParser.parseFeature("something:invald"); }