@Test public void testEqual() { RequestItem requestItem1 = null; RequestItem requestItem2 = null; Action notPrivacyPolicy = null; assertTrue("Same null privacy policy should be equal", RequestItemUtils.equal(requestItem1, requestItem1)); assertTrue("Null privacy policies should be equal", RequestItemUtils.equal(requestItem1, requestItem2)); assertTrue("Null privacy policy and null object should be equal", RequestItemUtils.equal(requestItem1, notPrivacyPolicy)); requestItem1 = new RequestItem(); requestItem2 = new RequestItem(); notPrivacyPolicy = new Action(); assertTrue("Same empty privacy policy should be equal", RequestItemUtils.equal(requestItem1, requestItem1)); assertTrue("Empty privacy policies should be equal", RequestItemUtils.equal(requestItem1, requestItem2)); assertTrue("Empty privacy policies should be equal (inverse)", RequestItemUtils.equal(requestItem2, requestItem1)); assertFalse("Empty privacy policy and empty object should not be equal", RequestItemUtils.equal(requestItem1, notPrivacyPolicy)); List<Condition> conditions1 = new ArrayList<Condition>(); conditions1.add(ConditionUtils.create(ConditionConstants.SHARE_WITH_3RD_PARTIES, "1")); requestItem1 = RequestItemUtils.create(ResourceUtils.create(DataIdentifierScheme.CONTEXT, CtxAttributeTypes.ACTION), ActionUtils.createList(ActionConstants.READ), conditions1); assertTrue("Same privacy policy should be equal", RequestItemUtils.equal(requestItem1, requestItem1)); assertFalse("Different privacy policies should be equal", RequestItemUtils.equal(requestItem1, requestItem2)); assertFalse("Different privacy policies should be equal (inverse)", RequestItemUtils.equal(requestItem2, requestItem1)); requestItem2 = RequestItemUtils.create(ResourceUtils.create(DataIdentifierScheme.CONTEXT, CtxAttributeTypes.ACTION), ActionUtils.createList(ActionConstants.WRITE), conditions1); assertFalse("Different privacy policies should be equal (2)", RequestItemUtils.equal(requestItem1, requestItem2)); assertFalse("Different privacy policies should be equal (inverse) (2)", RequestItemUtils.equal(requestItem2, requestItem1)); requestItem2 = RequestItemUtils.create(ResourceUtils.create(DataIdentifierScheme.CONTEXT, CtxAttributeTypes.ACTION), ActionUtils.createList(ActionConstants.READ), conditions1); assertTrue("Equal privacy policies should be equal", RequestItemUtils.equal(requestItem1, requestItem2)); assertTrue("Equal privacy policies should be equal (inverse)", RequestItemUtils.equal(requestItem2, requestItem1)); assertFalse("Privacy policy and object should not be equal", RequestItemUtils.equal(requestItem1, notPrivacyPolicy)); requestItem2 = RequestItemUtils.create(ResourceUtils.create(DataIdentifierScheme.CONTEXT, CtxAttributeTypes.ACTION), ActionUtils.createList(ActionConstants.READ), conditions1, true); assertFalse("Equal privacy policies should not be equal", RequestItemUtils.equal(requestItem1, requestItem2)); assertFalse("Equal privacy policies should not be equal (inverse)", RequestItemUtils.equal(requestItem2, requestItem1)); assertTrue("Similar privacy policies should be Similar", RequestItemUtils.equal(requestItem1, requestItem2, true)); assertTrue("Similar privacy policies should be Similar (inverse)", RequestItemUtils.equal(requestItem2, requestItem1, true)); }
public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2) { return equal(o1, o2, false); }
RequestItemUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2) { return equal(o1, o2, false); } }
RequestItemUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2) { return equal(o1, o2, false); }  }
RequestItemUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2) { return equal(o1, o2, false); }  static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem create(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Resource resource, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Condition> conditions); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem create(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Resource resource, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Condition> conditions, boolean optional); static String toXmlString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem requestItem); static String toXmlString(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> requestItems); static String toString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem value); static String toString(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> values); @Deprecated static boolean equals(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2, boolean dontCheckOptional); static boolean equal(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> o1, Object o2); static boolean contain(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem needle, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> haystack); static RequestItem toRequestItem(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem requestItemBean); static List<RequestItem> toRequestItems(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> requestItemBeans); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem toRequestItemBean(RequestItem requestItem); static List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> toRequestItemBeans(List<RequestItem> requestItems); }
RequestItemUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2) { return equal(o1, o2, false); }  static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem create(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Resource resource, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Condition> conditions); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem create(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Resource resource, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Condition> conditions, boolean optional); static String toXmlString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem requestItem); static String toXmlString(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> requestItems); static String toString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem value); static String toString(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> values); @Deprecated static boolean equals(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem o1, Object o2, boolean dontCheckOptional); static boolean equal(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> o1, Object o2); static boolean contain(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem needle, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> haystack); static RequestItem toRequestItem(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem requestItemBean); static List<RequestItem> toRequestItems(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> requestItemBeans); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem toRequestItemBean(RequestItem requestItem); static List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.RequestItem> toRequestItemBeans(List<RequestItem> requestItems);  }