@@ -62,7 +62,7 @@ public void deleteTest() throws MapRouletteException
6262 when (deleteResource .getStatusCode ()).thenReturn (HttpStatus .SC_NOT_FOUND )
6363 .thenReturn (HttpStatus .SC_NO_CONTENT ).thenReturn (HttpStatus .SC_OK )
6464 .thenReturn (HttpStatus .SC_INTERNAL_SERVER_ERROR );
65- when (deleteResource .getRequestBodyAsString ()).thenReturn ("test" );
65+ when (deleteResource .getResponseBodyAsString ()).thenReturn ("test" );
6666 final var query = Query .builder ().delete ("" ).build ();
6767 Assertions .assertTrue (connection .execute (query ).isEmpty ());
6868 Assertions .assertTrue (connection .execute (query ).isEmpty ());
@@ -80,7 +80,7 @@ public void retrieveTest() throws MapRouletteException
8080 when (getResource .getStatusCode ()).thenReturn (HttpStatus .SC_NOT_FOUND )
8181 .thenReturn (HttpStatus .SC_NO_CONTENT ).thenReturn (HttpStatus .SC_OK );
8282 final var responseString = "{\" test\" :\" test\" }" ;
83- when (getResource .getRequestBodyAsString ()).thenReturn (responseString );
83+ when (getResource .getResponseBodyAsString ()).thenReturn (responseString );
8484
8585 final var query = Query .builder ().get ("" ).build ();
8686 // First request will respond with NOT_FOUND
@@ -103,7 +103,7 @@ public void createNewTest() throws MapRouletteException
103103 final var postResource = factory .resource (HttpPost .METHOD_NAME );
104104 when (postResource .getStatusCode ()).thenReturn (HttpStatus .SC_CREATED )
105105 .thenReturn (HttpStatus .SC_OK ).thenReturn (HttpStatus .SC_INTERNAL_SERVER_ERROR );
106- when (postResource .getRequestBodyAsString ()).thenReturn ("{\" id\" :1234}" )
106+ when (postResource .getResponseBodyAsString ()).thenReturn ("{\" id\" :1234}" )
107107 .thenReturn ("{\" id\" :6543}" );
108108 final var query = Query .builder ().post ("" ).build ();
109109 Assertions .assertEquals (Optional .of ("{\" id\" :1234}" ), connection .execute (query ));
0 commit comments