@Test public void testCreateContact() throws IllegalArgumentException, BusinessException { Contact contact = new Contact(mail); contactRepository.create(contact); contactRepository.delete(contact); }
@Test public void testCreateContactTwice() throws IllegalArgumentException, BusinessException { Contact contact = new Contact(mail); contactRepository.create(contact); try { contactRepository.create(contact); Assert.assertTrue(false); } catch (BusinessException e) { Assert.assertTrue(true); } contactRepository.delete(contact); }