### Question:
VehicleModelJdbcGateway implements VehicleModelGateway { @Override public VehicleModel save(final VehicleModel vehicleModel) { jdbcTemplate.update( "INSERT INTO RENT_A_CAR.VEHICLE_MODEL (NAME, AC, AUTOMATIC_TRANSMISSION, SEATS) VALUES (?, ?, ?, ?)", vehicleModel.getName(), vehicleModel.isAc(), vehicleModel.isAutomaticTransmission(), vehicleModel.getSeats()); return vehicleModel; } VehicleModelJdbcGateway(final JdbcTemplate jdbcTemplate); @Override VehicleModel save(final VehicleModel vehicleModel); @Override Optional<VehicleModel> findByModel(final String model);  }### Answer:
@Test void test_save_duplicateName_doesNotSave() { final VehicleModel vehicleModel = new VehicleModel(); vehicleModel.setName("model"); vehicleModelGateway.save(vehicleModel); Assertions.assertThrows(DuplicateKeyException.class, () -> vehicleModelGateway.save(vehicleModel)); }