### Question:
RentVehicleAdapter { public HttpResponse rentVehicle(final Reservation reservation) { HttpResponse httpResponse; if (isValidInput(reservation)) { final RentVehicleInputData registerVehicleInputData = buildInputData(reservation); inputPort.rentVehicle(registerVehicleInputData, outputPort); httpResponse = outputPort.getHttpResponse(); } else { httpResponse = new HttpResponse(HttpStatus.BAD_REQUEST, "Invalid input data!"); } return httpResponse; } RentVehicleAdapter(final RentVehicleInputPort inputPort); HttpResponse rentVehicle(final Reservation reservation); String getRentId();  }### Answer:
@Test public void test_rentVehicle_returnsCreated() { final Reservation reservation = createValidReservation(); final RentVehicleAdapter rentVehicleAdapter = new RentVehicleAdapter( new MockRentVehicleInputPort()); final HttpResponse httpResponse = rentVehicleAdapter.rentVehicle(reservation); Assertions.assertEquals(HttpStatus.CREATED, httpResponse.getStatus()); }
@Test public void test_rentVehicle_sameRent_returnsConflict() { final Reservation reservation = createValidReservation(); final RentVehicleAdapter rentVehicleAdapter = new RentVehicleAdapter( new MockRentVehicleInputPort()); rentVehicleAdapter.rentVehicle(reservation); final HttpResponse httpResponse = rentVehicleAdapter.rentVehicle(reservation); Assertions.assertEquals(HttpStatus.CONFLICT, httpResponse.getStatus()); }
@Test public void test_rentVehicle_nullReservation_returnsBadRequest() { final RentVehicleAdapter rentVehicleAdapter = new RentVehicleAdapter( new MockRentVehicleInputPort()); final HttpResponse httpResponse = rentVehicleAdapter.rentVehicle(null); Assertions.assertEquals(HttpStatus.BAD_REQUEST, httpResponse.getStatus()); }