class RegisterRenterUseCase implements RegisterRenterInputPort {

    @Override
    public void registerRenter(final RegisterRenterInputData inputData,
        final RegisterRenterOutputPort outputPort) {
        Renter renter = new Renter();
        renter.setFirstName(inputData.getFirstName());
        renter.setLastName(inputData.getLastName());
        renter.setEmail(inputData.getEmail());
        renter.setTelephoneNumber(inputData.getTelephoneNumber());

        boolean renterRegistered = false;
        final Optional<Renter> optionalRenter = gatewaysAccessor.getRenterGateway()
            .findByEmail(renter.getEmail());
        if (!optionalRenter.isPresent()) {
            gatewaysAccessor.getRenterGateway().save(renter);
            renterRegistered = true;
        }

        final RegisterRenterOutputData registerRenterOutputData = new RegisterRenterOutputData(
            renterRegistered);
        outputPort.present(registerRenterOutputData);
    }

    public  RegisterRenterUseCase(final GatewaysAccessor gatewaysAccessor);

}