### Question:
CreateDeleteProjectAction extends AvailableLaterObject<Void> { public void setProjects(Projects projects) { this.projects = projects; } CreateDeleteProjectAction(ProjectDir dir, boolean delete); void setProjects(Projects projects); @Override Void calculate();  }### Answer:
@Test public void testCreate() throws Exception { Projects projects = Mockito.mock(Projects.class); action = new CreateDeleteProjectAction(dir, false); action.setProjects(projects); AvailableLaterWaiter.await(action); Mockito.verify(projects).add(dir); Mockito.verifyNoMoreInteractions(projects); }
@Test public void testDelete() throws Exception { Projects projects = Mockito.mock(Projects.class); action = new CreateDeleteProjectAction(dir, true); action.setProjects(projects); AvailableLaterWaiter.await(action); Mockito.verify(projects).remove(dir); Mockito.verifyNoMoreInteractions(projects); }