RoleAccess { public RoleAccess setRoles(List<String> roles) { this.roles = roles; return this; }  RoleAccess setRoles(List<String> roles); List<String> getRoles(); @Override boolean equals(Object another); public List<String> roles; }
@Test public void TestEqualsFalse() { RoleAccess ra1 = new RoleAccess(); RoleAccess ra2 = new RoleAccess(); List<String> roles = Arrays.asList("role1", "role2", "role3"); ra1.setRoles(roles); Assert.assertNotEquals(ra1, ra2); Assert.assertNotEquals("", ra1); }