### Question:
VehicleBrandJdbcGateway implements VehicleBrandGateway { @Override public VehicleBrand save(final VehicleBrand vehicleBrand) { jdbcTemplate.update("INSERT INTO RENT_A_CAR.VEHICLE_BRAND (NAME) VALUES (?)", vehicleBrand.getName()); return vehicleBrand; } VehicleBrandJdbcGateway(final JdbcTemplate jdbcTemplate); @Override VehicleBrand save(final VehicleBrand vehicleBrand); @Override Optional<VehicleBrand> findByBrand(final String brand);  }### Answer:
@Test void test_save_duplicateName_doesNotSave() { final VehicleBrand vehicleBrand = new VehicleBrand(); vehicleBrand.setName("VehicleBrand 1"); vehicleBrandGateway.save(vehicleBrand); Assertions.assertThrows(DuplicateKeyException.class, () -> vehicleBrandGateway.save(vehicleBrand)); }