### Question:
NavigationService { public synchronized boolean canNavigateBack() { return pages.size() >= 2; } @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 testCanNavigateBack() { assertFalse(navigationService.canNavigateBack()); navigationService.navigate("/testpage1.fxml"); assertFalse(navigationService.canNavigateBack()); navigationService.navigate("/testpage2.fxml"); assertTrue(navigationService.canNavigateBack()); navigationService.navigateBack(); assertFalse(navigationService.canNavigateBack()); }