@Test
public void testFillAttributeValue() throws Exception {

	System.out.println("testFillAttributeValue()");
	when(session.getPerunBl().getAttributesManagerBl().getAttribute(any(PerunSession.class), any(Facility.class), anyString())).thenReturn(new Attribute() {
		{
			setValue(999);
		}
	});
	when(session.getPerunBl().getAttributesManagerBl().getAttribute(any(PerunSession.class), any(Resource.class), anyString())).thenReturn(new Attribute() {
		{
			setValue(1000);
		}
	},new Attribute() {
		{
			setValue(1001);
		}
	});
	attributeToCheck = classInstance.fillAttribute(session, new User(), new Facility(), attributeToCheck);
	assertEquals("Filled attribute should be the lowest from all resource and facility values", 999,attributeToCheck.getValue());
}