diff options
author | su622b <sunil.unnava@att.com> | 2018-04-11 19:56:37 -0400 |
---|---|---|
committer | su622b <sunil.unnava@att.com> | 2018-04-11 19:56:55 -0400 |
commit | 5519f8372acf8d4f573739b8e819f7a1e569a019 (patch) | |
tree | 46f968c8f84b09fa7a285444baa79d2b4d6c3deb /src/test/java | |
parent | c0aeea3d201d320c83cd30497ac3c3e875e3c107 (diff) |
support for post requests with auth2.0.0-ONAPbeijing2.0.0-ONAP
Issue-ID: DMAAP-404
Change-Id: Iaa85ab5410472fca4dd6118d2a53efc1737609d5
Signed-off-by: su622b <sunil.unnava@att.com>
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/att/nsa/mr/client/impl/MRBaseClientTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/java/com/att/nsa/mr/client/impl/MRBaseClientTest.java b/src/test/java/com/att/nsa/mr/client/impl/MRBaseClientTest.java index b05cc7f..56cf954 100644 --- a/src/test/java/com/att/nsa/mr/client/impl/MRBaseClientTest.java +++ b/src/test/java/com/att/nsa/mr/client/impl/MRBaseClientTest.java @@ -305,8 +305,8 @@ public class MRBaseClientTest { PowerMockito.when(response.readEntity(String.class)).thenReturn("{\"test\":\"test\"}"); PowerMockito.when(response.getHeaders()).thenReturn(map); - PowerMockito.when(DmaapClientUtil.getResponsewtBasicAuth(DmaapClientUtil.getTarget("/path"), - Base64.encodeAsString("username:password"))).thenReturn(response); + PowerMockito.when(DmaapClientUtil.postResponsewtBasicAuth(DmaapClientUtil.getTarget("/path"), + Base64.encodeAsString("username:password"), new String("{\"test\":\"test\"}").getBytes(), "application/json")).thenReturn(response); mrBaseClient.post("/path", new String("{\"test\":\"test\"}").getBytes(), "application/json", "username", "password", "HTTPAUTH"); @@ -378,8 +378,8 @@ public class MRBaseClientTest { PowerMockito.when(response.readEntity(String.class)).thenReturn("{\"test\":\"test\"}"); PowerMockito.when(response.getHeaders()).thenReturn(map); - PowerMockito.when(DmaapClientUtil.getResponsewtBasicAuth(DmaapClientUtil.getTarget("/path"), - Base64.encodeAsString("username:password"))).thenReturn(response); + PowerMockito.when(DmaapClientUtil.postResponsewtBasicAuth(DmaapClientUtil.getTarget("/path"), + Base64.encodeAsString("username:password"), new String("{\"test\":\"test\"}").getBytes(), "application/json")).thenReturn(response); mrBaseClient.postWithResponse("/path", new String("{\"test\":\"test\"}").getBytes(), "application/json", "username", "password", "HTTPAUTH"); |