Navigator { public static Navigator newInstance() { FragmentManager fragmentManager = ContextRetriever.INSTANCE.getActivity().getFragmentManager(); BrushOptionsDialog brushOptionsDialog = new BrushOptionsDialog(); FlowerOptionsDialog flowerOptionsDialog = new FlowerOptionsDialog(); FlowerSelectedListener flowerSelectedListener = Classes.from(SketchRetriever.INSTANCE.getZenSketch()); flowerOptionsDialog.setFlowerSelectedListener(flowerSelectedListener); return new Navigator(fragmentManager, brushOptionsDialog, flowerOptionsDialog); } Navigator(FragmentManager fragmentManager, BrushOptionsDialog brushOptionsDialog, FlowerOptionsDialog flowerOptionsDialog); static Navigator newInstance(); void openBrushSelectionDialog(); void openFlowerSelectionDialog();  }
@Test public void testThatNewInstanceReturnsNotNullNavigator() { givenThatHasActivity(); Assertions.assertThat(Navigator.newInstance()).isNotNull(); }
@Test public void testThatNewInstanceReturnsANewInstance() { givenThatHasActivity(); Navigator firstInstance = Navigator.newInstance(); Navigator secondInstance = Navigator.newInstance(); Assertions.assertThat(firstInstance).isNotEqualTo(secondInstance); }