### Question:
IPvXCondition extends EntitlementConditionAdaptor { @Override public String toString() { String s = null; try { s = toJSONObject().toString(2); } catch (JSONException e) { debugError(e, "toString()"); } return s; } protected  IPvXCondition(Debug debug, T initialStartIp, T initialEndIp, IPVersion version); protected  IPvXCondition(Debug debug, T initialStartIp, T initialEndIp, IPVersion version,
                            String startIp, String endIp, List<String> ipRange, List<String> dnsName); @Override void setState(String state); String getStartIp(); String getEndIp(); void setStartIpAndEndIp(String startIp, String endIp); List<String> getDnsName(); void setDnsName(List<String> dnsName); @Deprecated List<String> getIpRange(); @Deprecated void setIpRange(List<String> ipRanges); @Override String getState(); @Override void validate(); @Override ConditionDecision evaluate(String realm, Subject subject, String resourceName, Map<String, Set<String>> env); @SuppressWarnings("unchecked") String getRequestIp(Map env); String getSessionIp(Subject subject); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test(expectedExceptions = JsonMappingException.class) public void testJacksonJsonDeserializationRejectsConfigurationIfNoDnsNameOrIpRangeDefined() throws Exception { final ObjectMapper mapper = new ObjectMapper(); final String emptyJsonObject = json(object()).toString(); mapper.readValue(emptyJsonObject, condition.getClass()); }