@Test
public void testGetBusinessObjectDataAssertNoAuthorizationHeaderWhenNoSsl() throws Exception
{

    HttpClientOperations mockHttpClientOperations = mock(HttpClientOperations.class);
    HttpClientOperations originalHttpClientOperations = (HttpClientOperations) ReflectionTestUtils.getField(downloaderWebClient, "httpClientOperations");
    ReflectionTestUtils.setField(downloaderWebClient, "httpClientOperations", mockHttpClientOperations);
    try
    {
        CloseableHttpResponse closeableHttpResponse = mock(CloseableHttpResponse.class);
        when(mockHttpClientOperations.execute(any(), any())).thenReturn(closeableHttpResponse);
        when(closeableHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(HttpVersion.HTTP_1_1, 200, "OK"));
        when(closeableHttpResponse.getEntity()).thenReturn(new StringEntity(xmlHelper.objectToXml(new BusinessObjectData())));
        DownloaderInputManifestDto manifest = new DownloaderInputManifestDto();
        downloaderWebClient.getRegServerAccessParamsDto().setUseSsl(false);
        downloaderWebClient.getBusinessObjectData(manifest);
        verify(mockHttpClientOperations).execute(any(), argThat(httpUriRequest -> httpUriRequest.getFirstHeader("Authorization") == null));
    }
    finally
    {
        ReflectionTestUtils.setField(downloaderWebClient, "httpClientOperations", originalHttpClientOperations);
    }
}