@Test
public void equalsTest()
{

   ProcessingInformation pi = new ProcessingInformation("Request");
   pi.setRemoteAddress("123.12.122.33");
   pi.setUsername("user1");
   ProcessingInformation pi1 = new ProcessingInformation("Request");
   pi1.setRemoteAddress("99.99.99.123");
   pi1.setUsername("user1");
   ProcessingInformation pi2 = new ProcessingInformation("Request");
   pi2.setRemoteAddress("99.99.99.123");
   pi2.setUsername("user2");
   ProcessingInformation pi3 = new ProcessingInformation("Request");
   UserKey uk = new UserKey(pi, new UserSelection[]{UserSelection.LOGIN});
   UserKey uk1 = new UserKey(pi1, new UserSelection[]{UserSelection.IP});
   UserKey uk2 = new UserKey(pi2, new UserSelection[]{UserSelection.LOGIN, UserSelection.IP});
   UserKey uk3 = new UserKey(pi3, new UserSelection[]{UserSelection.LOGIN, UserSelection.IP});
   Assert.assertTrue(uk.equals(uk1)); // Compare by LOGIN with same LOGIN only
   Assert.assertFalse(uk.equals(uk2)); // Compare by LOGIN with different LOGIN only
   Assert.assertTrue(uk1.equals(uk2)); // Compare by IP with same IP
   Assert.assertFalse(uk1.equals(uk)); // Compare by IP different IP
   Assert.assertFalse(uk2.equals(uk)); // Compare with different IP and LOGIN
   Assert.assertTrue(uk2.equals(uk2)); // Compare with same IP and LOGIN
   Assert.assertFalse(uk3.equals(uk)); // Compare with different IP and LOGIN
   Assert.assertTrue(uk3.equals(uk3)); // Compare with different IP and LOGIN
   Assert.assertFalse(uk2.equals(uk3)); // Compare with different IP and LOGIN
}