Source:
<code>public void testExecute_invalidRequests_shouldFail() { ______TS("non existent session name"); CourseAttributes course = typicalBundle.courses.get("typicalCourse1"); FeedbackSessionAttributes session = typicalBundle.feedbackSessions.get("session1InCourse1"); String randomSessionName = "randomName"; <START> assertNotNull(course.getId(), session.getFeedbackSessionName()); <END> String[] params = { Const.ParamsNames.COURSE_ID, course.getId(), Const.ParamsNames.FEEDBACK_SESSION_NAME, randomSessionName, }; assertNull(logic.getFeedbackSession(randomSessionName, course.getId())); PublishFeedbackSessionAction publishFeedbackSessionAction = getAction(params); JsonResult result = getJsonResult(publishFeedbackSessionAction); MessageOutput output = (MessageOutput) result.getOutput(); assertEquals(String.format("Trying to update a non-existent feedback session: %s/%s", course.getId(), randomSessionName), output.getMessage()); assertEquals(result.getStatusCode(), HttpStatus.SC_INTERNAL_SERVER_ERROR); ______TS("non existent course id"); String randomCourseId = "randomCourseId"; params = new String[] { Const.ParamsNames.COURSE_ID, randomCourseId, Const.ParamsNames.FEEDBACK_SESSION_NAME, session.getFeedbackSessionName(), }; assertNull(logic.getFeedbackSession(session.getFeedbackSessionName(), randomCourseId)); publishFeedbackSessionAction = getAction(params); result = getJsonResult(publishFeedbackSessionAction); output = (MessageOutput) result.getOutput(); assertEquals(String.format("Trying to update a non-existent feedback session: %s/%s", randomCourseId, session.getFeedbackSessionName()), output.getMessage()); assertEquals(result.getStatusCode(), HttpStatus.SC_INTERNAL_SERVER_ERROR); }</code><technical_language>assertion try do here? BTW, parameter of assertNotNull is message object. is assertion method for asserting non-null objects</technical_language>

Target:
public void testExecute_invalidRequests_shouldFail() { ______TS("non existent session name"); CourseAttributes course = typicalBundle.courses.get("typicalCourse1"); FeedbackSessionAttributes session = typicalBundle.feedbackSessions.get("session1InCourse1"); String randomSessionName = "randomName"; assertNotNull(logic.getFeedbackSession(session.getFeedbackSessionName(), course.getId())); String[] params = { Const.ParamsNames.COURSE_ID, course.getId(), Const.ParamsNames.FEEDBACK_SESSION_NAME, randomSessionName, }; assertNull(logic.getFeedbackSession(randomSessionName, course.getId())); PublishFeedbackSessionAction publishFeedbackSessionAction = getAction(params); JsonResult result = getJsonResult(publishFeedbackSessionAction); MessageOutput output = (MessageOutput) result.getOutput(); assertEquals(String.format("Trying to update a non-existent feedback session: %s/%s", course.getId(), randomSessionName), output.getMessage()); assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, result.getStatusCode()); ______TS("non existent course id"); String randomCourseId = "randomCourseId"; params = new String[] { Const.ParamsNames.COURSE_ID, randomCourseId, Const.ParamsNames.FEEDBACK_SESSION_NAME, session.getFeedbackSessionName(), }; assertNull(logic.getFeedbackSession(session.getFeedbackSessionName(), randomCourseId)); publishFeedbackSessionAction = getAction(params); result = getJsonResult(publishFeedbackSessionAction); output = (MessageOutput) result.getOutput(); assertEquals(String.format("Trying to update a non-existent feedback session: %s/%s", randomCourseId, session.getFeedbackSessionName()), output.getMessage()); assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, result.getStatusCode()); }