@Test
public void treeTypeIdFilterTest() {

	IdmBasePermission permission = IdmBasePermission.ADMIN;
	SystemEntityType entityType = SystemEntityType.IDENTITY;
	IdmTreeTypeDto treeType = new IdmTreeTypeDto();
	treeType.setName("SomeTreeTypeName");
	treeType.setCode("CodeCodeCodeCode");
	treeType = treeTypeService.save(treeType);
	IdmTreeTypeDto treeType2 = new IdmTreeTypeDto();
	treeType2.setName("SomeTreeTypeName2");
	treeType2.setCode("CodeCodeCodeCode2");
	treeType2 = treeTypeService.save(treeType2);
	SysSystemDto system = createSystem();
	SysSchemaObjectClassDto objectClass = createObjectClass(system);
	SysSystemMappingDto mappingSystem1 = testHelper.createMappingSystem(entityType, objectClass);
	mappingSystem1.setTreeType(treeType.getId());
	mappingSystem1 = mappingService.save(mappingSystem1);
	SysSystemMappingDto mappingSystem2 = testHelper.createMappingSystem(entityType, objectClass);
	mappingSystem2.setTreeType(treeType2.getId());
	mappingSystem2 = mappingService.save(mappingSystem2);
	SysSystemMappingFilter filter = new SysSystemMappingFilter();
	filter.setTreeTypeId(mappingSystem1.getTreeType());
	Page<SysSystemMappingDto> result = mappingService.find(filter, null, permission);
	assertEquals(1, result.getTotalElements());
	assertTrue(result.getContent().contains(mappingSystem1));
	assertFalse(result.getContent().contains(mappingSystem2));
}