### Question:
NavigationService { public synchronized void clearPages() { pages.clear(); } @Inject  NavigationService(IFxmlLoaderProvider loader); void setNavigationController(INavigatable controller); INavigatable getNavigationController(); FXMLLoader createLoader(final String fxmlFile); synchronized void navigate(final String fxmlFile); synchronized void navigateBack(); synchronized boolean canNavigateBack(); synchronized void clearPages();  }### Answer:
@Test public void testClearPages() { navigationService.navigate("/testpage1.fxml"); navigationService.navigate("/testpage2.fxml"); navigationService.navigate("/testpage3.fxml"); ObservableList<Node> pages = getPages(); assertTrue(pages.size() == 3); navigationService.clearPages(); assertTrue(pages.size() == 0); }