Source:
<code>public void testGetSessionResultsForUser_instructorAllQuestionsSpecificSection_shouldGenerateCorrectBundle() { DataBundle responseBundle = loadDataBundle("/FeedbackSessionResultsTest.json"); removeAndRestoreDataBundle(responseBundle); FeedbackSessionAttributes session = responseBundle.feedbackSessions.get("standard.session"); InstructorAttributes instructor = responseBundle.instructors.get("instructor1OfCourse1"); SessionResultsBundle bundle = fsLogic.getSessionResultsForUser( session.getFeedbackSessionName(), session.getCourseId(), instructor.getEmail(), UserRole.INSTRUCTOR, null, "Section A"); int totalResponse = 0; for (Map.Entry<String, List<FeedbackResponseAttributes>> entry : bundle.getQuestionResponseMap().entrySet()) { totalResponse += entry.getValue().size(); } int totalMissingResponse = 0; for (Map.Entry<String, List<FeedbackResponseAttributes>> entry : bundle.getQuestionMissingResponseMap().entrySet()) { totalMissingResponse += entry.getValue().size(); } assertEquals(7, totalResponse); assertEquals(36, totalMissingResponse); assertEquals(8, bundle.getQuestionsMap().size()); assertEquals(8, bundle.getQuestionResponseMap().size()); assertEquals(8, bundle.getQuestionMissingResponseMap().size()); String mapString = tableToString(bundle.getResponseVisibilityTable()); List<String> expectedStrings = new ArrayList<>(); Collections.addAll(expectedStrings, getResponseId("qn3.resp1", responseBundle) + "={true,false}", getResponseId("qn4.resp3", responseBundle) + "={true,true}", getResponseId("qn2.resp3", responseBundle) + "={false,false}", getResponseId("qn2.resp1", responseBundle) + "={false,false}"); AssertHelper.assertContains(expectedStrings, mapString); <START> assertEquals(43, bundle.getResponseVisibilityTable().size()); <END> mapString = tableToString(bundle.getCommentVisibilityTable()); expectedStrings.clear(); AssertHelper.assertContains(expectedStrings, mapString); }</code><technical_language>Similarly for 43 = 7 + 36</technical_language>

Target:
public void testGetSessionResultsForUser_instructorAllQuestionsSpecificSection_shouldGenerateCorrectBundle() { DataBundle responseBundle = loadDataBundle("/FeedbackSessionResultsTest.json"); removeAndRestoreDataBundle(responseBundle); FeedbackSessionAttributes session = responseBundle.feedbackSessions.get("standard.session"); InstructorAttributes instructor = responseBundle.instructors.get("instructor1OfCourse1"); SessionResultsBundle bundle = fsLogic.getSessionResultsForUser( session.getFeedbackSessionName(), session.getCourseId(), instructor.getEmail(), UserRole.INSTRUCTOR, null, "Section A"); int totalResponse = 0; for (Map.Entry<String, List<FeedbackResponseAttributes>> entry : bundle.getQuestionResponseMap().entrySet()) { totalResponse += entry.getValue().size(); } int totalMissingResponse = 0; for (Map.Entry<String, List<FeedbackResponseAttributes>> entry : bundle.getQuestionMissingResponseMap().entrySet()) { totalMissingResponse += entry.getValue().size(); } assertEquals(7, totalResponse); assertEquals(36, totalMissingResponse); assertEquals(8, bundle.getQuestionsMap().size()); assertEquals(8, bundle.getQuestionResponseMap().size()); assertEquals(8, bundle.getQuestionMissingResponseMap().size()); String mapString = tableToString(bundle.getResponseVisibilityTable()); List<String> expectedStrings = new ArrayList<>(); Collections.addAll(expectedStrings, getResponseId("qn3.resp1", responseBundle) + "={true,false}", getResponseId("qn4.resp3", responseBundle) + "={true,true}", getResponseId("qn2.resp3", responseBundle) + "={false,false}", getResponseId("qn2.resp1", responseBundle) + "={false,false}"); AssertHelper.assertContains(expectedStrings, mapString); assertEquals(totalResponse + totalMissingResponse, bundle.getResponseVisibilityTable().size()); mapString = tableToString(bundle.getCommentVisibilityTable()); expectedStrings.clear(); AssertHelper.assertContains(expectedStrings, mapString); }