3132333435363738394041
roleB.setName("ID2"); roleB.setRoleId("ID2"); roleB.setSource("source"); Assert.assertEquals(-1, roleA.compareTo(roleB)); Assert.assertEquals(1, roleB.compareTo(roleA)); } public void testCompareDifferentSource() { Role roleA = new Role();
47484950515253545556
roleB.setName("ID1"); roleB.setRoleId("ID1"); roleB.setSource("source2"); Assert.assertEquals(-1, roleA.compareTo(roleB)); Assert.assertEquals(1, roleB.compareTo(roleA)); } }