class CompositeObjectType implements ObjectType {
    private final ObjectType main;
    private final ObjectType second;

    @Override
    public List<PropertyMetadata> getProperties() {
        return Stream
            .concat(main.getProperties().stream(), second.getProperties().stream())
            .collect(Collectors.toList());
    }

    @Override
    public List<Relation> getRelations(String type) {
        return Stream
            .concat(main.getRelations(type).stream(), second.getRelations(type).stream())
            .collect(Collectors.toList());
    }

    @Override
    public List<ObjectType> getRelatedTypes() {
        return Stream
            .concat(main.getRelatedTypes().stream(), second.getRelatedTypes().stream())
            .collect(Collectors.toList());
    }

    @Override
    public Map<String, List<Relation>> getRelations() {
        return new CompositeMap<>(main.getRelations(), second.getRelations());
    }

    @Override
    public String getId() {
        return main.getId();
    }

    @Override
    public String getName() {
        return main.getName();
    }

    @Override
    public String getDescription() {
        return main.getDescription();
    }

    @Override
    public Map<String, Object> getExpands() {<FILL_FUNCTION_BODY>}
}

        Map<String, Object> expands = new HashMap<>();
        if (MapUtils.isNotEmpty(main.getExpands())) {
            expands.putAll(main.getExpands());
        }
        if (MapUtils.isNotEmpty(second.getExpands())) {
            expands.putAll(second.getExpands());
        }
        return expands;
    
<no_super_class>