    @Test
    public void run_responseCodeNotMet_error() throws IOException, IllegalAccessException {

        final FileDownloadConnection connection = mock(FileDownloadConnection.class);
        when(connection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_PRECON_FAILED);
        when(mockConnectTask.connect()).thenReturn(connection);

        downloadRunnable.run();

        // retry first.
        verify(mockCallback).onRetry(any(Exception.class), anyLong());

        // then callback error.
        verify(mockCallback).onError(any(Exception.class));
    }