createProperty("Name", EdmSimpleTypeKind.String, buildingType);
createProperty("Image", EdmSimpleTypeKind.Binary, buildingType);
when(buildingType.getNavigationPropertyNames()).thenReturn(Arrays.asList("nb_Rooms"));
createNavigationProperty("nb_Rooms", EdmMultiplicity.MANY, buildingEntitySet, roomEntitySet);
EdmFunctionImport employeeSearchFunctionImport =
createFunctionImportMock(defaultContainer, "EmployeeSearch", employeeType, EdmMultiplicity.MANY);
when(employeeSearchFunctionImport.getEntitySet()).thenReturn(employeeEntitySet);
EdmParameter employeeSearchParameter = mock(EdmParameter.class);
when(employeeSearchParameter.getType()).thenReturn(EdmSimpleTypeKind.String.getEdmSimpleTypeInstance());
when(employeeSearchFunctionImport.getParameterNames()).thenReturn(Arrays.asList("q"));
when(employeeSearchFunctionImport.getParameter("q")).thenReturn(employeeSearchParameter);
createFunctionImportMock(defaultContainer, "AllLocations", locationComplexType, EdmMultiplicity.MANY);
createFunctionImportMock(defaultContainer, "AllUsedRoomIds", EdmSimpleTypeKind.String.getEdmSimpleTypeInstance(),
EdmMultiplicity.MANY);
createFunctionImportMock(defaultContainer, "MaximalAge", EdmSimpleTypeKind.Int16.getEdmSimpleTypeInstance(),
EdmMultiplicity.ONE);
createFunctionImportMock(defaultContainer, "MostCommonLocation", locationComplexType, EdmMultiplicity.ONE);
EdmFunctionImport managerPhotoFunctionImport =
createFunctionImportMock(defaultContainer, "ManagerPhoto", EdmSimpleTypeKind.Binary.getEdmSimpleTypeInstance(),
EdmMultiplicity.ONE);
EdmParameter managerPhotoParameter = mock(EdmParameter.class);
when(managerPhotoParameter.getType()).thenReturn(EdmSimpleTypeKind.String.getEdmSimpleTypeInstance());
EdmFacets managerPhotoParameterFacets = mock(EdmFacets.class);
when(managerPhotoParameterFacets.isNullable()).thenReturn(false);
when(managerPhotoParameter.getFacets()).thenReturn(managerPhotoParameterFacets);
when(managerPhotoFunctionImport.getParameterNames()).thenReturn(Arrays.asList("Id"));
when(managerPhotoFunctionImport.getParameter("Id")).thenReturn(managerPhotoParameter);
EdmFunctionImport oldestEmployeeFunctionImport =
createFunctionImportMock(defaultContainer, "OldestEmployee", employeeType, EdmMultiplicity.ONE);
when(oldestEmployeeFunctionImport.getEntitySet()).thenReturn(employeeEntitySet);
EdmEntityContainer specificContainer = mock(EdmEntityContainer.class);
when(specificContainer.getEntitySet("Employees")).thenReturn(employeeEntitySet);
when(specificContainer.getName()).thenReturn("Container1");