package uk.ac.ebi.quickgo.annotation.converter;

import java.io.IOException;
import java.nio.file.Paths;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.Resource;

/**
 * @author Tony Wardell
 * Date: 26/01/2017
 * Time: 10:47
 * Created with IntelliJ IDEA.
 */
@Configuration
class HeaderTestConfig {

    @Value("${annotation.download.ontology.source}")
    private Resource resource;

    /**
     * Ensures that placeholders are replaced with property values
     */
    @Bean
    static PropertySourcesPlaceholderConfigurer propertyPlaceHolderConfigurer() {
        return new PropertySourcesPlaceholderConfigurer();
    }

    @Bean
    public AnnotationDownloadFileHeader header() throws IOException {
        return new AnnotationDownloadFileHeader(Paths.get(resource.getURI()));
    }
}

@@ -578,18 +578,17 @@
 ontology
-.s
+S
 ource%7D%22)
@@ -911,17 +911,39 @@
 eHeader 
-h
+annotationDownloadFileH
 eader() 

refactor resource name