class MetadataWriter {

    public void writeEntities(@NonNull final String metadataClass, @NonNull final List<MetadataEntity> entities) {
        final List<MetadataFileColumn> columns = retrieveEntityColumns(entities);
        addLine(headerLine(metadataClass, columns));
        entities.stream()
                .flatMap(entity -> entityLines(entity, columns))
                .forEach(this::addLine);
    }

    public  MetadataWriter(final MetadataFileFormat format, final Writer writer);

}