super.tearDown();
}
@Test
public void testCreateUpdateDeleteContact() {
Contact contact = new Contact();
contact.setId("new_id");
contact.setName("New Name");
contact.setContent("New Content");
client.createContact("admin", contact);
contact = client.findContact("admin", "new_id");
assertNotNull(contact);
assertEquals("new_id", contact.getId());
assertEquals("New Name", contact.getName());
assertEquals("New Content", contact.getContent());
List<Contact> contacts = client.findContacts("admin");
assertEquals(1, contacts.size());
contact = contacts.get(0);
assertEquals("new_id", contact.getId());
assertEquals("New Name", contact.getName());
assertEquals("New Content", contact.getContent());
contact.setName("Updated Name");
contact.setContent("Updated Content");
client.updateContact("admin", contact);
contact = client.findContact("admin", "new_id");
assertEquals("new_id", contact.getId());
assertEquals("Updated Name", contact.getName());
assertEquals("Updated Content", contact.getContent());
contacts = client.findContacts("admin");
assertEquals(1, contacts.size());
contact = contacts.get(0);
assertEquals("new_id", contact.getId());
assertEquals("Updated Name", contact.getName());
assertEquals("Updated Content", contact.getContent());
client.deleteContact("admin", "new_id");
contacts = client.findContacts("admin");
assertEquals(0, contacts.size());
try {
client.findContact("admin", "new_id");