### Question:
ValidationUtils { public static void validDirectionsRoute(DirectionsRoute directionsRoute, boolean defaultMilestonesEnabled) { if (defaultMilestonesEnabled) { RouteOptions routeOptions = directionsRoute.routeOptions(); checkNullRouteOptions(routeOptions); checkInvalidVoiceInstructions(routeOptions); checkInvalidBannerInstructions(routeOptions); } } private  ValidationUtils(); static void validDirectionsRoute(DirectionsRoute directionsRoute,
                                          boolean defaultMilestonesEnabled);  }### Answer:
@Test(expected = MissingFormatArgumentException.class) public void validDirectionsRoute_isInvalidWithNullRouteOptions() throws Exception { DirectionsRoute route = buildTestDirectionsRoute(DIRECTIONS_WITHOUT_VOICE_INSTRUCTIONS); RouteOptions invalidRouteOptions = null; route = route.toBuilder().routeOptions(invalidRouteOptions).build(); ValidationUtils.validDirectionsRoute(route, true); }
@Test(expected = MissingFormatArgumentException.class) public void validDirectionsRoute_isInvalidWithNullInstructions() throws Exception { DirectionsRoute routeWithNullInstructions = buildRouteWithNullInstructions(); ValidationUtils.validDirectionsRoute(routeWithNullInstructions, true); }
@Test(expected = MissingFormatArgumentException.class) public void validDirectionsRoute_isInvalidWithFalseVoiceInstructions() throws Exception { DirectionsRoute routeWithFalseVoiceInstructions = buildRouteWithFalseVoiceInstructions(); ValidationUtils.validDirectionsRoute(routeWithFalseVoiceInstructions, true); }
@Test(expected = MissingFormatArgumentException.class) public void validDirectionsRoute_isInvalidWithFalseBannerInstructions() throws Exception { DirectionsRoute routeWithFalseBannerInstructions = buildRouteWithFalseBannerInstructions(); ValidationUtils.validDirectionsRoute(routeWithFalseBannerInstructions, true); }