예제 #1
0
 private boolean clientExists(RestOperations client, OAuth2ProtectedResourceDetails resource) {
   ResponseEntity<String> response =
       client.getForEntity(
           serverRunning.getClientsUri() + "/" + resource.getClientId(), String.class);
   return response != null && response.getStatusCode() == HttpStatus.OK;
 }
예제 #2
0
 private void createClient(RestOperations client, ClientDetails clientDetails) {
   ResponseEntity<String> response =
       client.postForEntity(serverRunning.getClientsUri(), clientDetails, String.class);
   assertEquals(HttpStatus.CREATED, response.getStatusCode());
 }