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

	System.out.println("testResourceWithSameGID()");
	attributeToCheck.setValue("my name");
	Resource resource2 = new Resource();
	when(sess.getPerunBl().getResourcesManagerBl().getResourcesByAttribute(sess, attributeToCheck)).thenReturn(Arrays.asList(resource, resource2));
	when(sess.getPerunBl().getAttributesManagerBl().getAllAttributesStartWithNameWithoutNullValue(sess, resource, AttributesManager.NS_RESOURCE_ATTR_DEF + ":unixGID-namespace:")).thenReturn(Collections.singletonList(attributeToCheck));
	when(sess.getPerunBl().getModulesUtilsBl().haveRightToWriteAttributeInAnyGroupOrResource(sess, new ArrayList<>(), Collections.singletonList(resource), attributeToCheck, attributeToCheck)).thenReturn(true);
	when(sess.getPerunBl().getModulesUtilsBl().haveTheSameAttributeWithTheSameNamespace(sess, resource, attributeToCheck)).thenReturn(2);
	classInstance.checkAttributeSemantics(sess, resource, attributeToCheck);
}