@@ -0,0 +1,1574 @@
+package br.com.aurum.astrea;%0A%0Aimport br.com.aurum.astrea.controller.ContactController;%0Aimport br.com.aurum.astrea.dao.ContactDao;%0Aimport br.com.aurum.astrea.domain.Contact;%0Aimport br.com.aurum.astrea.exception.ValidationException;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.Arrays;%0A%0Aimport static org.mockito.Mockito.*;%0A%0A/**%0A * Created by diegom on 08/06/2017.%0A */%0Apublic class DeleteContactTest %7B%0A    private ContactDao mockDAO;%0A    private Contact contactDiego;%0A    private ContactController controller;%0A%0A    @Before%0A    public void setup() %7B%0A        mockDAO = mock(ContactDao.class);%0A        contactDiego = createContact(%22Diego Melo%22, %22diegomeloadm@gmail.com%22);%0A        controller = new ContactController(mockDAO);%0A    %7D%0A%0A    private Contact createContact(String name, String email) %7B%0A        Contact contact = new Contact();%0A        contact.setName(name);%0A        contact.setEmails(Arrays.asList(new String%5B%5D%7Bemail%7D));%0A        return contact;%0A    %7D%0A%0A    @Test%0A    public void deleteAContact() %7B%0A        Long contactId = 1L;%0A        when(mockDAO.getById(contactId)).thenReturn(contactDiego);%0A        doNothing().when(mockDAO).delete(contactDiego);%0A        controller.delete(contactId);%0A        verify(mockDAO, times(1)).delete(contactDiego);%0A    %7D%0A%0A    @Test%0A    public void notDeleteWithInvalidId() %7B%0A        long contactId = 2L;%0A        when(mockDAO.getById(contactId)).thenReturn(null);%0A        doNothing().when(mockDAO).delete(contactDiego);%0A        controller.delete(contactId);%0A        verify(mockDAO, times(0)).delete(contactDiego);%0A    %7D%0A%7D%0A

add teste para deleção de contato