test_class.file: spring-ddd/spring-ddd-bank/src/test/java/de/beuth/knabe/spring_ddd_bank/rest_interface/ApplicationControllerTest.java
test_class.identifier: ApplicationControllerTest
test_case.body: @Test
  	public void depositCommand() {
  		final Client hans = new Client("hans", LocalDate.parse("1966-12-31"));
  		final Client lisa = new Client("lisa", LocalDate.parse("1972-02-16"));
  		final ApplicationController ctl = new ApplicationController(null);
  		final ResponseEntity<ClientResource[]> result = ctl._clientsToResources(Arrays.asList(hans, lisa));
  		final ClientResource hansResource = result.getBody()[0];
  		final ClientResource lisaResource = result.getBody()[1];
  		assertEquals(2, result.getBody().length);
  		assertEquals(null, hansResource.id);
  		assertEquals("hans", hansResource.username);
  		assertEquals("31.12.1966", hansResource.birthDate);
  		assertEquals(null, lisaResource.id);
  		assertEquals("lisa", lisaResource.username);
  		assertEquals("16.02.1972", lisaResource.birthDate);
  	}
test_case.class_method_signature: ApplicationControllerTest.depositCommand()
test_case.full_signature: @Test public void depositCommand()
test_case.identifier: depositCommand
test_case.invocations: parse parse _clientsToResources asList getBody getBody assertEquals getBody assertEquals assertEquals assertEquals assertEquals assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void depositCommand()
focal_class.declarator: bankService
focal_class.modifier: private final
focal_class.original_string: private final BankService bankService;
focal_class.type: BankService
focal_class.var_name: bankService
focal_class.declarator: className = getClass().getSimpleName()
focal_class.modifier: private final
focal_class.original_string: private final String className = getClass().getSimpleName();
focal_class.type: String
focal_class.var_name: className
focal_class.file: spring-ddd/spring-ddd-bank/src/main/java/de/beuth/knabe/spring_ddd_bank/rest_interface/ApplicationController.java
focal_class.identifier: ApplicationController
focal_class.class_method_signature: ApplicationController.ApplicationController(final BankService bankService)
focal_class.full_signature: @Autowired public  ApplicationController(final BankService bankService)
focal_class.identifier: ApplicationController
focal_class.modifiers: @Autowired public
focal_class.parameters: (final BankService bankService)
focal_class.signature:  ApplicationController(final BankService bankService)
focal_class.class_method_signature: ApplicationController.home(/* final WebSecurityConfig webSecurityConfig, */final HttpMethod method,
  			final WebRequest request)
focal_class.full_signature: @GetMapping(path = "/") public ResponseEntity<String> home(/* final WebSecurityConfig webSecurityConfig, */final HttpMethod method,
  			final WebRequest request)
focal_class.identifier: home
focal_class.modifiers: @GetMapping(path = "/") public
focal_class.parameters: (/* final WebSecurityConfig webSecurityConfig, */final HttpMethod method,
  			final WebRequest request)
focal_class.return: ResponseEntity<String>
focal_class.signature: ResponseEntity<String> home(/* final WebSecurityConfig webSecurityConfig, */final HttpMethod method,
  			final WebRequest request)
focal_class.class_method_signature: ApplicationController.create2Clients(@ApiParam(hidden = true) final HttpMethod method,
  			final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Creates 2 random clients, sometimes fails after first. " + "Returns a list of all clients. This is useful for populating the database " + "and for checking, if the transaction rollback mechanism works.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/bank/pair") public ResponseEntity<ClientResource[]> create2Clients(@ApiParam(hidden = true) final HttpMethod method,
  			final WebRequest request)
focal_class.identifier: create2Clients
focal_class.modifiers: @ApiOperation(value = "Creates 2 random clients, sometimes fails after first. " + "Returns a list of all clients. This is useful for populating the database " + "and for checking, if the transaction rollback mechanism works.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/bank/pair") public
focal_class.parameters: (@ApiParam(hidden = true) final HttpMethod method,
  			final WebRequest request)
focal_class.return: ResponseEntity<ClientResource[]>
focal_class.signature: ResponseEntity<ClientResource[]> create2Clients(@ApiParam(hidden = true) final HttpMethod method,
  			final WebRequest request)
focal_class.class_method_signature: ApplicationController.createClient(@RequestBody final ClientResource clientResource,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Create a client from the passed client resource.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/bank/client") public ResponseEntity<ClientResource> createClient(@RequestBody final ClientResource clientResource,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.identifier: createClient
focal_class.modifiers: @ApiOperation(value = "Create a client from the passed client resource.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/bank/client") public
focal_class.parameters: (@RequestBody final ClientResource clientResource,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.return: ResponseEntity<ClientResource>
focal_class.signature: ResponseEntity<ClientResource> createClient(@RequestBody final ClientResource clientResource,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.class_method_signature: ApplicationController.deleteClient(@PathVariable @ApiParam("username of client") final String username,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Delete the client with the given username.", authorizations = { @Authorization(value = "basicAuth") }) @DeleteMapping("/bank/client/{username}") public ResponseEntity<String> deleteClient(@PathVariable @ApiParam("username of client") final String username,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.identifier: deleteClient
focal_class.modifiers: @ApiOperation(value = "Delete the client with the given username.", authorizations = { @Authorization(value = "basicAuth") }) @DeleteMapping("/bank/client/{username}") public
focal_class.parameters: (@PathVariable @ApiParam("username of client") final String username,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.return: ResponseEntity<String>
focal_class.signature: ResponseEntity<String> deleteClient(@PathVariable @ApiParam("username of client") final String username,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.class_method_signature: ApplicationController.findClients(
  			@ApiParam("Returns all clients born at fromBirth or later.") @RequestParam(name = "fromBirth", defaultValue = "") final String fromBirth,
  			@ApiParam("Returns all clients with an account with a balance of minBalance or more.") @RequestParam(name = "minBalance", defaultValue = "") final String minBalance,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Find clients. Omit Parameters to retrieve all clients.", authorizations = { @Authorization(value = "basicAuth") }) @GetMapping(path = "/bank/client") public ResponseEntity<ClientResource[]> findClients(
  			@ApiParam("Returns all clients born at fromBirth or later.") @RequestParam(name = "fromBirth", defaultValue = "") final String fromBirth,
  			@ApiParam("Returns all clients with an account with a balance of minBalance or more.") @RequestParam(name = "minBalance", defaultValue = "") final String minBalance,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.identifier: findClients
focal_class.modifiers: @ApiOperation(value = "Find clients. Omit Parameters to retrieve all clients.", authorizations = { @Authorization(value = "basicAuth") }) @GetMapping(path = "/bank/client") public
focal_class.parameters: (
  			@ApiParam("Returns all clients born at fromBirth or later.") @RequestParam(name = "fromBirth", defaultValue = "") final String fromBirth,
  			@ApiParam("Returns all clients with an account with a balance of minBalance or more.") @RequestParam(name = "minBalance", defaultValue = "") final String minBalance,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.return: ResponseEntity<ClientResource[]>
focal_class.signature: ResponseEntity<ClientResource[]> findClients(
  			@ApiParam("Returns all clients born at fromBirth or later.") @RequestParam(name = "fromBirth", defaultValue = "") final String fromBirth,
  			@ApiParam("Returns all clients with an account with a balance of minBalance or more.") @RequestParam(name = "minBalance", defaultValue = "") final String minBalance,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.class_method_signature: ApplicationController.createAccount(@RequestBody final String accountName,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Creates a new account for the authenticated client with his userName. " + "The account gets the name, which is passed as request body.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/client/account") public ResponseEntity<AccountAccessResource> createAccount(@RequestBody final String accountName,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.identifier: createAccount
focal_class.modifiers: @ApiOperation(value = "Creates a new account for the authenticated client with his userName. " + "The account gets the name, which is passed as request body.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/client/account") public
focal_class.parameters: (@RequestBody final String accountName,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.return: ResponseEntity<AccountAccessResource>
focal_class.signature: ResponseEntity<AccountAccessResource> createAccount(@RequestBody final String accountName,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.class_method_signature: ApplicationController.deposit(@RequestBody final DepositCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Deposits the given amount of money to the account with the given accountNo. " + "This is executed as the authenticated client with his username.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/client/deposit") public ResponseEntity<Void> deposit(@RequestBody final DepositCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.identifier: deposit
focal_class.modifiers: @ApiOperation(value = "Deposits the given amount of money to the account with the given accountNo. " + "This is executed as the authenticated client with his username.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/client/deposit") public
focal_class.parameters: (@RequestBody final DepositCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.return: ResponseEntity<Void>
focal_class.signature: ResponseEntity<Void> deposit(@RequestBody final DepositCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.class_method_signature: ApplicationController.transfer(@RequestBody final TransferCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Transfers the given amount of money from the account with the given sourceAccountNo to " + "the account with the given destinationAccountNo. Requires, that the current user is the owner " + "of the given source account.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/client/transfer") public ResponseEntity<AccountResource> transfer(@RequestBody final TransferCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.identifier: transfer
focal_class.modifiers: @ApiOperation(value = "Transfers the given amount of money from the account with the given sourceAccountNo to " + "the account with the given destinationAccountNo. Requires, that the current user is the owner " + "of the given source account.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/client/transfer") public
focal_class.parameters: (@RequestBody final TransferCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.return: ResponseEntity<AccountResource>
focal_class.signature: ResponseEntity<AccountResource> transfer(@RequestBody final TransferCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.class_method_signature: ApplicationController.addAccountManager(@RequestBody final AddAccountManagerCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Adds the client with the given username as an account manager to the account with the " + "given accountNo. Requires, that the current user is the owner of the given account.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/client/manager") public ResponseEntity<AccountAccessResource> addAccountManager(@RequestBody final AddAccountManagerCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.identifier: addAccountManager
focal_class.modifiers: @ApiOperation(value = "Adds the client with the given username as an account manager to the account with the " + "given accountNo. Requires, that the current user is the owner of the given account.", authorizations = { @Authorization(value = "basicAuth") }) @PostMapping("/client/manager") public
focal_class.parameters: (@RequestBody final AddAccountManagerCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.return: ResponseEntity<AccountAccessResource>
focal_class.signature: ResponseEntity<AccountAccessResource> addAccountManager(@RequestBody final AddAccountManagerCommand command,
  			@ApiParam(hidden = true) final HttpMethod method, final WebRequest request)
focal_class.class_method_signature: ApplicationController.accountsReport(@ApiParam(hidden = true) final HttpMethod method,
  			final WebRequest request)
focal_class.full_signature: @ApiOperation(value = "Returns a report of all accounts the current user manages with columns access right (isOwner|manages), the balance, and the name of the account", authorizations = { @Authorization(value = "basicAuth") }) @GetMapping("/client/account") public ResponseEntity<String> accountsReport(@ApiParam(hidden = true) final HttpMethod method,
  			final WebRequest request)
focal_class.identifier: accountsReport
focal_class.modifiers: @ApiOperation(value = "Returns a report of all accounts the current user manages with columns access right (isOwner|manages), the balance, and the name of the account", authorizations = { @Authorization(value = "basicAuth") }) @GetMapping("/client/account") public
focal_class.parameters: (@ApiParam(hidden = true) final HttpMethod method,
  			final WebRequest request)
focal_class.return: ResponseEntity<String>
focal_class.signature: ResponseEntity<String> accountsReport(@ApiParam(hidden = true) final HttpMethod method,
  			final WebRequest request)
focal_class.class_method_signature: ApplicationController._print(final HttpMethod method, final WebRequest request)
focal_class.full_signature: private void _print(final HttpMethod method, final WebRequest request)
focal_class.identifier: _print
focal_class.modifiers: private
focal_class.parameters: (final HttpMethod method, final WebRequest request)
focal_class.return: void
focal_class.signature: void _print(final HttpMethod method, final WebRequest request)
focal_class.class_method_signature: ApplicationController._randomClientBirthDate()
focal_class.full_signature: private LocalDate _randomClientBirthDate()
focal_class.identifier: _randomClientBirthDate
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: LocalDate
focal_class.signature: LocalDate _randomClientBirthDate()
focal_class.class_method_signature: ApplicationController._clientsToResources(final List<Client> clients)
focal_class.full_signature:  ResponseEntity<ClientResource[]> _clientsToResources(final List<Client> clients)
focal_class.identifier: _clientsToResources
focal_class.parameters: (final List<Client> clients)
focal_class.return: ResponseEntity<ClientResource[]>
focal_class.signature: ResponseEntity<ClientResource[]> _clientsToResources(final List<Client> clients)
focal_class.class_method_signature: ApplicationController._findClient(final WebRequest request)
focal_class.full_signature: private Client _findClient(final WebRequest request)
focal_class.identifier: _findClient
focal_class.modifiers: private
focal_class.parameters: (final WebRequest request)
focal_class.return: Client
focal_class.signature: Client _findClient(final WebRequest request)
focal_method.body: ResponseEntity<ClientResource[]> _clientsToResources(final List<Client> clients) {
  		final Stream<ClientResource> result = clients.stream().map(ClientResource::new);
  		final ClientResource[] resultArray = result.toArray(ClientResource[]::new);
  		return new ResponseEntity<>(resultArray, HttpStatus.OK);
  	}
focal_method.class_method_signature: ApplicationController._clientsToResources(final List<Client> clients)
focal_method.full_signature:  ResponseEntity<ClientResource[]> _clientsToResources(final List<Client> clients)
focal_method.identifier: _clientsToResources
focal_method.invocations: map stream toArray
focal_method.parameters: (final List<Client> clients)
focal_method.return: ResponseEntity<ClientResource[]>
focal_method.signature: ResponseEntity<ClientResource[]> _clientsToResources(final List<Client> clients)