@Test public void testGroupKeyCodeSetExtraction() { PayTypeBo pstnRptGrpBo = boService.findByPrimaryKey(PayTypeBo.class, Collections.singletonMap("hrPayTypeId", "1")); Set<String> extractedGroupKeyCodeWithIdSet = pstnRptGrpBo.getGroupKeyCodeSet(); Assert.assertEquals(extractedGroupKeyCodeWithIdSet.size(), 2); Assert.assertTrue(extractedGroupKeyCodeWithIdSet.contains("ISU-IA")); Assert.assertTrue(extractedGroupKeyCodeWithIdSet.contains("UGA-GA")); pstnRptGrpBo = boService.findByPrimaryKey(PayTypeBo.class, Collections.singletonMap("hrPayTypeId", "5")); extractedGroupKeyCodeWithIdSet = pstnRptGrpBo.getGroupKeyCodeSet(); Assert.assertEquals(2, extractedGroupKeyCodeWithIdSet.size()); Assert.assertTrue(extractedGroupKeyCodeWithIdSet.contains("IU-IN")); Assert.assertTrue(extractedGroupKeyCodeWithIdSet.contains("UGA-GA")); pstnRptGrpBo = boService.findByPrimaryKey(PayTypeBo.class, Collections.singletonMap("hrPayTypeId", "2")); extractedGroupKeyCodeWithIdSet = pstnRptGrpBo.getGroupKeyCodeSet(); Assert.assertTrue( (extractedGroupKeyCodeWithIdSet == null) || extractedGroupKeyCodeWithIdSet.isEmpty()); pstnRptGrpBo = boService.findByPrimaryKey(PayTypeBo.class, Collections.singletonMap("hrPayTypeId", "4")); extractedGroupKeyCodeWithIdSet = pstnRptGrpBo.getGroupKeyCodeSet(); Assert.assertTrue( (extractedGroupKeyCodeWithIdSet == null) || extractedGroupKeyCodeWithIdSet.isEmpty()); }