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

	System.out.println("testGroupWithSameGID()");
	attributeToCheck.setValue("my name");
	Group group2 = new Group(2,"group2","Group 2",null,null,null,null,0,0);
	List<Group> listOfGroups = new ArrayList<>();
	listOfGroups.add(group2);
	when(sess.getPerunBl().getGroupsManagerBl().getGroupsByAttribute(sess, attributeToCheck)).thenReturn(listOfGroups);
	when(sess.getPerunBl().getAttributesManagerBl().getAllAttributesStartWithNameWithoutNullValue(sess, group, AttributesManager.NS_GROUP_ATTR_DEF + ":unixGID-namespace:")).thenReturn(Collections.singletonList(attributeToCheck));
	when(sess.getPerunBl().getModulesUtilsBl().haveRightToWriteAttributeInAnyGroupOrResource(sess, listOfGroups, new ArrayList<>(), attributeToCheck, attributeToCheck)).thenReturn(true);
	when(sess.getPerunBl().getModulesUtilsBl().haveTheSameAttributeWithTheSameNamespace(sess, group2, attributeToCheck)).thenReturn(2);
	classInstance.checkAttributeSemantics(sess, group, attributeToCheck);
}