HttpBaggageRestrictionManagerProxy implements BaggageRestrictionManagerProxy { List<BaggageRestrictionResponse> parseJson(String json) throws BaggageRestrictionManagerException { try { return gson.fromJson(json, LIST_TYPE); } catch (JsonSyntaxException e) { throw new BaggageRestrictionManagerException("Cannot deserialize json", e); } } HttpBaggageRestrictionManagerProxy(String hostPort); @Override List<BaggageRestrictionResponse> getBaggageRestrictions(String serviceName);  }
@Test(expected = BaggageRestrictionManagerException.class) public void testParseInvalidJson() throws Exception { undertest.parseJson("invalid json"); }