@@ -0,0 +1,2221 @@
+package uk.ac.ebi.quickgo.annotation.service.comm.rest.ontology.transformer.completablevalue;%0A%0Aimport uk.ac.ebi.quickgo.annotation.service.comm.rest.ontology.model.BasicTaxonomyNode;%0Aimport uk.ac.ebi.quickgo.rest.model.CompletableValue;%0Aimport uk.ac.ebi.quickgo.rest.search.request.FilterRequest;%0Aimport uk.ac.ebi.quickgo.rest.search.request.converter.ConvertedFilter;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.core.Is.is;%0Aimport static org.hamcrest.core.IsNull.nullValue;%0Aimport static uk.ac.ebi.quickgo.annotation.service.comm.rest.ontology.transformer.TaxonomyNameInjectorTestHelper%0A        .TEST_TAXON_ID;%0Aimport static uk.ac.ebi.quickgo.annotation.service.comm.rest.ontology.transformer.TaxonomyNameInjectorTestHelper%0A        .basicTaxonomyNode;%0Aimport static uk.ac.ebi.quickgo.annotation.service.comm.rest.ontology.transformer.TaxonomyNameInjectorTestHelper%0A        .buildFilterRequestSuccessfully;%0Aimport static uk.ac.ebi.quickgo.annotation.service.comm.rest.ontology.transformer.TaxonomyNameInjectorTestHelper%0A        .injectValueSuccessfully;%0A%0A%0A/**%0A * Created 12/04/17%0A * @author Edd%0A */%0Apublic class TaxonomyNameInjectorTest %7B%0A    private TaxonomyNameInjector nameInjector;%0A    private CompletableValue completableValue;%0A%0A    @Before%0A    public void setUp() %7B%0A        nameInjector = new TaxonomyNameInjector();%0A        completableValue = new CompletableValue(String.valueOf(TEST_TAXON_ID));%0A    %7D%0A%0A    @Test%0A    public void injectorIdIsGoName() %7B%0A        assertThat(nameInjector.getId(), is(%22taxonName%22));%0A    %7D%0A%0A    @Test%0A    public void responseValueIsInjectedToAnnotation() %7B%0A        ConvertedFilter%3CBasicTaxonomyNode%3E stubConvertedFilter = new ConvertedFilter%3C%3E(basicTaxonomyNode);%0A        assertThat(completableValue.value, is(nullValue()));%0A%0A        nameInjector.injectValueFromResponse(stubConvertedFilter, completableValue);%0A%0A        injectValueSuccessfully(completableValue.value);%0A    %7D%0A%0A    @Test%0A    public void correctFilterRequestIsBuilt() %7B%0A        FilterRequest filterRequest = nameInjector.buildFilterRequest(completableValue);%0A%0A        buildFilterRequestSuccessfully(filterRequest, nameInjector);%0A    %7D%0A%7D%0A

Test the CompletableValue version of the taxonomy injector.