### Question:
WindowStatusController { public void setStage(Stage stage) { this.stage = stage; initUi(); } @Inject  WindowStatusController(StageService service); void setStage(Stage stage); static final String PDFSAM_DISABLE_UI_RESTORE; }### Answer:
@Test public void defaultOnNullStatus() { when(service.getLatestStatus()).thenReturn(StageStatus.NULL); victim.setStage(victimStage); clickOn("show").sleep(200); assertTrue(victimStage.isMaximized()); }
@Test public void defaultOnDisableRestore() { when(service.getLatestStatus()).thenReturn(new StageStatus(10, 10, 10, 10)); System.setProperty(WindowStatusController.PDFSAM_DISABLE_UI_RESTORE, Boolean.TRUE.toString()); victim.setStage(victimStage); clickOn("show").sleep(200); assertTrue(victimStage.isMaximized()); System.setProperty(WindowStatusController.PDFSAM_DISABLE_UI_RESTORE, Boolean.FALSE.toString()); }