### Question:
UnzippingDeciderFactory { public UnzippingDecider createUnzippingDecider(Project project) { if (project == null) { return new UnzipAllTheThings(); } switch (project.getProjectType()) { case JAVA_ANT: return new DefaultUnzippingDecider(io, project); case JAVA_MAVEN: return new MavenUnzippingDecider(io, project); case MAKEFILE: return new DefaultUnzippingDecider(io, project); default: return new DefaultUnzippingDecider(io, project); } } UnzippingDeciderFactory(IOFactory io); UnzippingDecider createUnzippingDecider(Project project);  }### Answer:
@Test public void testFactoryGivesRightDeciderForAnt() { Project project = mock(Project.class); when(project.getProjectType()).thenReturn(ProjectType.JAVA_ANT); assertTrue(factory.createUnzippingDecider(project) instanceof DefaultUnzippingDecider); }
@Test public void testFactoryGivesRightDeciderForMaven() { Project project = mock(Project.class); when(project.getProjectType()).thenReturn(ProjectType.JAVA_MAVEN); assertTrue(factory.createUnzippingDecider(project) instanceof MavenUnzippingDecider); }
@Test public void testFactoryGivesRightDeciderForMakefile() { Project project = mock(Project.class); when(project.getProjectType()).thenReturn(ProjectType.MAKEFILE); assertTrue(factory.createUnzippingDecider(project) instanceof DefaultUnzippingDecider); }
@Test public void testFactoryGivesRightDeciderForNone() { Project project = mock(Project.class); when(project.getProjectType()).thenReturn(ProjectType.NONE); assertTrue(factory.createUnzippingDecider(project) instanceof DefaultUnzippingDecider); }
@Test public void testFactoryGivesRightDeciderForNullProject() { assertTrue(factory.createUnzippingDecider(null) instanceof UnzipAllTheThings); }