### Question:
JooqFlightDAO extends AbstractJooqDAO implements FlightDAO { @Override public List<Flight> findWithArrival(long arrival) { LOGGER.debug("Finding flights with arrival {}", arrival); Result<Record> result = context().select().from(FLIGHT).join(FLIGHT_SHIPS).on(FLIGHT_SHIPS.FLIGHT_ID.eq(FLIGHT.ID)).where(FLIGHT.ARRIVAL_IN_ROUND.eq(arrival)).fetch(); return readFlights(result); } @Inject  JooqFlightDAO(UnitOfWorkService unitOfWorkService); @Override void insert(Flight flight); @Override List<Flight> findWithPlayerId(UUID playerId); @Override List<Flight> findWithArrival(long arrival); @Override void update(Flight flight); @Override void delete(Flight flight); @Override List<Flight> findWithTypeAndDetected(FlightType type, boolean detected); @Override List<Flight> findWithStart(Location location);  }### Answer:
@Test public void testFindWithArrival() throws Exception { Flight expected = FlightScenario.Player1.FLIGHT_1; List<Flight> flights = sut.findWithArrival(expected.getArrivalInRound()); assertThat(flights, hasSize(1)); assertThat(flights.get(0), is(expected)); }
@Test public void testFindWithArrival2() throws Exception { List<Flight> flights = sut.findWithArrival(100); assertThat(flights, hasSize(0)); }