### Question:
InstructionListPresenter { boolean updateBannerListWith(RouteProgress routeProgress) { addBannerInstructions(routeProgress); return updateInstructionList(routeProgress); } InstructionListPresenter(RouteUtils routeUtils, DistanceFormatter distanceFormatter);   }### Answer:
@Test public void updateBannerListWith_instructionListIsPopulated() throws Exception { RouteProgress routeProgress = buildRouteProgress(); RouteUtils routeUtils = buildRouteUtils(routeProgress); DistanceFormatter distanceFormatter = mock(DistanceFormatter.class); InstructionListPresenter presenter = new InstructionListPresenter(routeUtils, distanceFormatter); boolean didUpdate = presenter.updateBannerListWith(routeProgress); assertTrue(didUpdate); }
@Test public void updateBannerListWith_emptyInstructionsReturnFalse() throws Exception { RouteProgress routeProgress = buildRouteProgress(); RouteUtils routeUtils = buildRouteUtils(routeProgress); clearInstructions(routeProgress); DistanceFormatter distanceFormatter = mock(DistanceFormatter.class); InstructionListPresenter presenter = new InstructionListPresenter(routeUtils, distanceFormatter); boolean didUpdate = presenter.updateBannerListWith(routeProgress); assertFalse(didUpdate); }