### Question:
LocationJdbcGateway implements LocationGateway { @Override public Optional<Location> findByName(final String name) { final List<Location> locations = jdbcTemplate .query("SELECT * FROM RENT_A_CAR.LOCATION WHERE NAME = ?", mapper, new Object[]{name}); return Optional.ofNullable(locations.isEmpty() ? null : locations.get(0)); } LocationJdbcGateway(final JdbcTemplate jdbcTemplate); @Override Location save(final Location location); @Override Optional<Location> findByName(final String name); @Override Iterable<Location> findAll();  }### Answer:
@Test void test_findByName_missingName_empty() { final Optional<Location> locationOptional = locationGateway.findByName("name"); Assertions.assertFalse(locationOptional.isPresent()); }