### Question:
JooqFlightDAO extends AbstractJooqDAO implements FlightDAO { @Override public void delete(Flight flight) { Preconditions.checkNotNull(flight, "flight"); LOGGER.debug("Deleting flight {}", flight); deleteShips(flight); context() .delete(FLIGHT) .where(FLIGHT.ID.eq(flight.getId())) .execute(); } @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 testDelete() throws Exception { Flight flight = FlightScenario.Player1.FLIGHT_2; sut.delete(flight); List<Map<String, Object>> flightRows = select("SELECT * FROM flight WHERE id = ?", flight.getId()); assertThat(flightRows, hasSize(0)); List<Map<String, Object>> flightShipsRows = select("SELECT * FROM flight_ships WHERE flight_id = ?", flight.getId()); assertThat(flightShipsRows, hasSize(0)); }