### Question:
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorTask.getRequestStatusAsString()); setCommonStatusReportParameters(statusReport); if (!isRejected() && !isInPendingState()) { setStatusReportParametersForAcceptedTask(statusReport); } return statusReport; } private  StatusReportGenerator(SensorTask sensorTask); static StatusReportGenerator createFor(SensorTask sensorTask); StatusReportType generateWithTaskingParameters(); StatusReportType generateWithoutTaskingParameters();  }### Answer:
@Test public void testGenerateForRejectedTask() throws Exception { StatusReportGenerator statusReporter = getStatusReporter(); validTask.setRequestStatus(TaskingRequestStatus.REJECTED); StatusReportType reportUnderTest = statusReporter.generateWithoutTaskingParameters(); assertSetParametersOfNonAcceptedTask(reportUnderTest); assertFalse(reportUnderTest.isSetEvent()); }
@Test public void testGenerateForPendingTask() throws Exception { StatusReportGenerator statusReporter = getStatusReporter(); StatusReportType reportUnderTest = statusReporter.generateWithoutTaskingParameters(); assertSetParametersOfNonAcceptedTask(reportUnderTest); assertFalse(reportUnderTest.isSetEvent()); }
@Test public void testGenerateForAcceptedTask() throws Exception { StatusReportGenerator statusReporter = getStatusReporter(); validTask.setRequestStatus(TaskingRequestStatus.ACCEPTED); StatusReportType reportUnderTest = statusReporter.generateWithoutTaskingParameters(); assertSetParametersOfAcceptedTask(reportUnderTest); }
@Test(expected = StatusInformationExpiredException.class) public void testGenerationOfAlreadyExpiredSensorTask() throws Exception { validTask.setTaskStatus(SensorTaskStatus.EXPIRED); getStatusReporter().generateWithoutTaskingParameters(); }
@Test public void testGenerate() throws Exception { assertNotNull(getStatusReporter().generateWithoutTaskingParameters()); }