return entitySet;
}
private static EdmEntityType createEntityTypeMock(final String name, final EdmSimpleTypeKind kind,
final String keyPropertyId) throws EdmException {
EdmEntityType entityType = mock(EdmEntityType.class);
when(entityType.getName()).thenReturn(name);
when(entityType.getNamespace()).thenReturn("RefScenario");
final EdmProperty keyProperty = createProperty(keyPropertyId, kind, entityType);
EdmFacets facets = mock(EdmFacets.class);
when(facets.getMaxLength()).thenReturn(null);
when(facets.isNullable()).thenReturn(false);
when(keyProperty.getFacets()).thenReturn(facets);
when(entityType.getKind()).thenReturn(EdmTypeKind.ENTITY);
when(entityType.getPropertyNames()).thenReturn(Arrays.asList(keyPropertyId));
when(entityType.getKeyPropertyNames()).thenReturn(Arrays.asList(keyPropertyId));
when(entityType.getKeyProperties()).thenReturn(Arrays.asList(keyProperty));
return entityType;
}