diff options
Diffstat (limited to 'rest-services/http-client/src/main/java/org/onap')
-rw-r--r-- | rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java b/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java index 2a1ba7a6..4795b00f 100644 --- a/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java +++ b/rest-services/http-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/adapters/http/test/DummyHttpServer.java @@ -67,6 +67,10 @@ public class DummyHttpServer { return sendString(httpServerResponse, Mono.fromCallable(() -> readResource(resourcePath))); } + public static Publisher<Void> sendError(HttpServerResponse httpServerResponse, int statusCode, String message){ + return sendString(httpServerResponse.status(statusCode), Mono.just(message)); + } + public static Publisher<Void> sendString(HttpServerResponse httpServerResponse, Publisher<String> content) { return httpServerResponse.sendString(content); } |