@Test
@DirtiesContext // @todo ?? don't know why this is needed, it affects SecurityContextAttributeAuthorizationTest
public void testLazy() throws Exception {

	InternalFeature feature = new InternalFeatureImpl();
	Assert.assertNotNull(attributeService.getAttributes(lazyLayerBeans, feature, featureBean));
	Attribute attribute;
	Attribute linked;
	attribute = feature.getAttributes().get("stringAttr");
	assertThat(attribute.getValue()).isEqualTo(TEST_STRING);
	assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
	attribute = feature.getAttributes().get("integerAttr");
	assertThat(attribute.getValue()).isEqualTo(TEST_INTEGER);
	assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
	attribute = feature.getAttributes().get("booleanAttr");
	assertThat(attribute.getValue()).isEqualTo(Boolean.TRUE);
	assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
	assertThat(containsLazy(feature.getAttributes())).isTrue();
	Feature dto = dtoConverter.toDto(feature);
	assertThat(containsLazy(dto.getAttributes())).isFalse();
	// verify rights on many-to-one attributes
	attribute = feature.getAttributes().get("manyToOneAttr");
	assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
	linked = ((ManyToOneAttribute) attribute).getValue().getAllAttributes().get("stringAttr");
	assertThat(linked.getValue()).isEqualTo(TEST_STRING2);
	assertThat(linked.isEditable()).isTrue(); // AllowAll -> all editable
	// verify rights on one-to-many attributes
	attribute = feature.getAttributes().get("oneToManyAttr");
	assertThat(attribute.isEditable()).isTrue(); // AllowAll -> all editable
	linked = ((OneToManyAttribute) attribute).getValue().get(0).getAllAttributes().get("stringAttr");
	assertThat(linked.getValue()).isEqualTo(TEST_STRING3);
	assertThat(linked.isEditable()).isTrue(); // AllowAll -> all editable
}