@Test public void givenNonEmptyStreamWhenDownloadSuccess() throws VitamClientException { IngestExternalClientFactory.changeMode((SecureClientConfiguration)null); final IngestExternalClient client = IngestExternalClientFactory.getInstance().getClient(); assertNotNull(client); final InputStream firstStream = StreamUtils.toInputStream("test"); final InputStream responseStream = client.downloadObjectAsync(new VitamContext(TENANT_ID), "1", IngestCollection.MANIFESTS).readEntity(InputStream.class); assertNotNull(responseStream); try { assertTrue(IOUtils.contentEquals(responseStream, firstStream)); } catch (final IOException e) { e.printStackTrace(); fail(); } }
@Override public Response downloadObjectAsync(VitamContext vitamContext, String objectId, IngestCollection type) throws VitamClientException { return ClientMockResultHelper.getObjectStream(); }
IngestExternalClientMock extends AbstractMockClient implements IngestExternalClient { @Override public Response downloadObjectAsync(VitamContext vitamContext, String objectId, IngestCollection type) throws VitamClientException { return ClientMockResultHelper.getObjectStream(); } }
IngestExternalClientMock extends AbstractMockClient implements IngestExternalClient { @Override public Response downloadObjectAsync(VitamContext vitamContext, String objectId, IngestCollection type) throws VitamClientException { return ClientMockResultHelper.getObjectStream(); }  }
IngestExternalClientMock extends AbstractMockClient implements IngestExternalClient { @Override public Response downloadObjectAsync(VitamContext vitamContext, String objectId, IngestCollection type) throws VitamClientException { return ClientMockResultHelper.getObjectStream(); }  @Override RequestResponse<Void> ingest(VitamContext vitamContext, InputStream stream,
        String contextId,
        String action); @Override RequestResponse<Void> ingest(VitamContext vitamContext, InputStream stream,
        IngestRequestParameters ingestRequestParameters); @Override Response downloadObjectAsync(VitamContext vitamContext, String objectId,
        IngestCollection type); @Override RequestResponse<Void> ingestLocal(VitamContext vitamContext, LocalFile localFile, String contextId,
        String action); @Override RequestResponse<Void> ingestLocal(VitamContext vitamContext, LocalFile localFile,
        IngestRequestParameters ingestRequestParameters); }
IngestExternalClientMock extends AbstractMockClient implements IngestExternalClient { @Override public Response downloadObjectAsync(VitamContext vitamContext, String objectId, IngestCollection type) throws VitamClientException { return ClientMockResultHelper.getObjectStream(); }  @Override RequestResponse<Void> ingest(VitamContext vitamContext, InputStream stream,
        String contextId,
        String action); @Override RequestResponse<Void> ingest(VitamContext vitamContext, InputStream stream,
        IngestRequestParameters ingestRequestParameters); @Override Response downloadObjectAsync(VitamContext vitamContext, String objectId,
        IngestCollection type); @Override RequestResponse<Void> ingestLocal(VitamContext vitamContext, LocalFile localFile, String contextId,
        String action); @Override RequestResponse<Void> ingestLocal(VitamContext vitamContext, LocalFile localFile,
        IngestRequestParameters ingestRequestParameters); static final String ID; }