### Question:
JooqHangarDAO extends AbstractJooqDAO implements HangarDAO { @Override public void insert(Hangar hangar) { Preconditions.checkNotNull(hangar, "hangar"); LOGGER.debug("Inserting hangar {}", hangar); context() .insertInto(HANGAR, HANGAR.ID, HANGAR.PLANET_ID, HANGAR.PLAYER_ID) .values(hangar.getId(), hangar.getPlanetId(), hangar.getPlayerId()) .execute(); insertShips(hangar); } @Inject  JooqHangarDAO(UnitOfWorkService unitOfWorkService); @Override Optional<Hangar> findWithPlanetId(UUID planetId); @Override void update(Hangar hangar); @Override void insert(Hangar hangar);  }### Answer:
@Test public void testInsert() throws Exception { Hangar hangar = new Hangar(UUID.fromString("3e757b40-a997-11e4-bcd8-0800200c9a66"), BasicScenario.Player1.Planet2.PLANET.getId(), BasicScenario.Player1.PLAYER.getId(), new Ships(new Ship(ShipType.DAEDALUS, 7), new Ship(ShipType.PROBE, 2))); sut.insert(hangar); List<Map<String, Object>> hangarRows = select("SELECT * FROM hangar WHERE id = ?", hangar.getId()); assertThat(hangarRows, hasSize(1)); verifyHangarRow(hangarRows.get(0), hangar); List<Map<String, Object>> hangarShipsRows = select("SELECT * FROM hangar_ships WHERE hangar_id = ?", hangar.getId()); assertThat(hangarShipsRows, hasSize(2)); verifyHangarShipsRow(hangarShipsRows.get(0), hangar.getShips().asList().get(0)); verifyHangarShipsRow(hangarShipsRows.get(1), hangar.getShips().asList().get(1)); }