registration.addBinding(binding1);
//System.out.println(regResource.getState().getContent());
assertEquals(1, reginfo.getRegistrationArray(0).getContactArray().length);
assertEquals(State.ACTIVE, reginfo.getRegistrationArray(0).getState());
Contact contact = reginfo.getRegistrationArray(0).getContactArray(0);
assertEquals(Event.REGISTERED, contact.getEvent());
assertEquals("sip:alice@localhost", contact.getUri());
//assertTrue(contact.getExpires().intValue() > 98 && contact.getExpires().intValue() <= 100);
registration.addBinding(new Binding(new UriImpl("sip:alice@localhost:5070"), "567@localhost", 1, now + 200000));
assertEquals(2, reginfo.getRegistrationArray(0).getContactArray().length);
assertEquals(State.ACTIVE, reginfo.getRegistrationArray(0).getState());
assertEquals(Event.REGISTERED, reginfo.getRegistrationArray(0).getContactArray(1).getEvent());
assertEquals("sip:alice@localhost", reginfo.getRegistrationArray(0).getContactArray(0).getUri());
assertEquals("sip:alice@localhost:5070", reginfo.getRegistrationArray(0).getContactArray(1).getUri());
registration.updateBinding(binding1, new UriImpl("sip:alice@newContact"), "123@localhost", 1, now + 200000);
assertEquals(2, reginfo.getRegistrationArray(0).getContactArray().length);
assertEquals(State.ACTIVE, reginfo.getRegistrationArray(0).getState());
assertEquals(Event.REFRESHED, reginfo.getRegistrationArray(0).getContactArray(0).getEvent());
assertEquals(contact.getId(), reginfo.getRegistrationArray(0).getContactArray(0).getId());
assertEquals("sip:alice@newContact", reginfo.getRegistrationArray(0).getContactArray(0).getUri());
registration.removeBinding(binding1);
assertEquals(1, reginfo.getRegistrationArray(0).getContactArray().length);
assertEquals(State.ACTIVE, reginfo.getRegistrationArray(0).getState());