@@ -0,0 +1,1921 @@
+package uk.ac.ebi.quickgo.annotation.download.header;%0A%0Aimport java.io.IOException;%0Aimport org.junit.Test;%0Aimport org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.nullValue;%0Aimport static org.mockito.Mockito.doThrow;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.verify;%0A%0A/**%0A * @author Tony Wardell%0A * Date: 16/08/2017%0A * Time: 17:02%0A * Created with IntelliJ IDEA.%0A */%0Apublic class AbstractHeaderCreatorTest %7B%0A%0A    private final ResponseBodyEmitter mockEmitter = mock(ResponseBodyEmitter.class);%0A    private final HeaderContent mockContent = mock(HeaderContent.class);%0A    private AbstractHeaderCreator abstractHeaderCreator = new AbstractHeaderCreator() %7B%0A        @Override protected void output(ResponseBodyEmitter emitter, HeaderContent content) throws IOException %7B%0A            emitter.send(content);%0A        %7D%0A    %7D;%0A%0A    @Test%0A    public void callToWriteInvokesOutput() throws Exception%7B%0A        abstractHeaderCreator.write(mockEmitter, mockContent);%0A%0A        verify(mockEmitter).send(mockContent);%0A    %7D%0A%0A    @Test%0A    public void whenEmitterThrowsIOExceptionNoExceptionIsThrown() throws Exception %7B%0A        Exception exception = null;%0A        doThrow(new IOException(%22Test IOException%22)).when(mockEmitter).send(mockContent);%0A%0A        try %7B%0A        abstractHeaderCreator.write(mockEmitter, mockContent);%0A        %7D catch (Exception e) %7B%0A            exception = e;%0A        %7D%0A%0A        assertThat(exception, nullValue());%0A    %7D%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void nullEmitterCausesExceptionToBeThrown()%7B%0A        abstractHeaderCreator.write(null, mockContent);%0A    %7D%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void nullContentCausesExceptionToBeThrown()%7B%0A        abstractHeaderCreator.write(mockEmitter, null);%0A    %7D%0A%7D%0A

Create test for AbstractHeaderCreator