class IngestExternalClientMock extends AbstractMockClient implements IngestExternalClient {

    @Override
    public RequestResponse<Void> ingest(VitamContext vitamContext, InputStream stream,
        String contextId,
        String action)
        throws IngestExternalException {
        if (stream == null) {
            throw new IngestExternalException("stream is null");
        }
        StreamUtils.closeSilently(stream);

        RequestResponseOK r = new RequestResponseOK<>();
        r.setHttpCode(Status.ACCEPTED.getStatusCode());
        r.addHeader(FAKE_X_REQUEST_ID, X_REQUEST_ID);

        return r;
    }

}