@Test(expected = WrongReferenceAttributeValueException.class)
public void testGroupWithSameGID() throws Exception {

	System.out.println("testGroupWithSameGID()");
	attributeToCheck.setValue("my name");
	Group group2 = new Group();
	when(sess.getPerunBl().getGroupsManagerBl().getGroupsByAttribute(sess, attributeToCheck)).thenReturn(Collections.singletonList(group2));
	when(sess.getPerunBl().getModulesUtilsBl().getListOfGroupGIDsFromListOfResourceGIDs(sess, new ArrayList<>())).thenReturn(Collections.singletonList(attributeToCheck));
	when(sess.getPerunBl().getModulesUtilsBl().haveRightToWriteAttributeInAnyGroupOrResource(sess, Collections.singletonList(group2), new ArrayList<>(), attributeToCheck, attributeToCheck)).thenReturn(true);
	when(sess.getPerunBl().getModulesUtilsBl().haveTheSameAttributeWithTheSameNamespace(sess, group2, attributeToCheck)).thenReturn(2);
	classInstance.checkAttributeSemantics(sess, resource, attributeToCheck);
}