### Question:
Utils { public static void setExclusionSubjectGroupId(SubjectGroup sg, Long id) { SubjectMatchType subjectMatchType = null; String idString = "(?!" + id + ")"; subjectMatchType = getSubjectMatchType(idString); sg.setSubjectMatch( subjectMatchType ); }  static void setSubjectGroupId(SubjectGroup sg, Long id); static void setExclusionSubjectGroupId(SubjectGroup sg, Long id); static SubjectMatchType getSubjectMatchType(Long id); static SubjectMatchType getSubjectMatchType(String idStr); static void setSubjectId(Subject subject, Long id); static void setExclusionSubjectId(Subject subject, Long id); static void setAllSubjectId(Subject subject); static Long getSubjectId(Subject subject); static Long getSubjectGroupId(SubjectGroup sg ); static Long getIdFromSubjectMatch(SubjectMatchType matchType); static boolean isExclusion(Subject subject); static boolean isSubjectType(Subject subject); static boolean isExclusion(SubjectGroup subjectGroup); static boolean isExclusion(List<SubjectMatchType> matchTypes); static boolean isSubjectType(List<SubjectMatchType> matchTypes);  }### Answer:
@Test public void testSetExclusionSubjectGroupId(){ Long id = 1L; SubjectGroup sg= new SubjectGroup(); Utils.setExclusionSubjectGroupId(sg, id); assertNotNull("SubjectGroup must not be null", sg); assertNotNull("SubjectMatch must contain at least 1 element", sg.getSubjectMatch()); assertEquals("Attr value id must be this String chain '(?!1)'", "(?!" + id.toString() + ")", sg.getSubjectMatch().getAttributeValue().getContent().get(0)); }