### Question:
JooqBuildingDAO extends AbstractJooqDAO implements BuildingDAO { @Override public void insert(Building building) { Preconditions.checkNotNull(building, "building"); LOGGER.debug("Inserting building {}", building); context().insertInto( BUILDING, BUILDING.ID, BUILDING.TYPE, BUILDING.LEVEL, BUILDING.PLANET_ID ).values( building.getId(), building.getType().getId(), building.getLevel(), building.getPlanetId() ).execute(); } @Inject  JooqBuildingDAO(UnitOfWorkService unitOfWorkService); @Override Buildings findWithPlanetId(UUID planetId); @Override void insert(Building building); @Override void update(Building building); @Override Optional<Building> findWithPlanetLocationAndType(Location location, BuildingType type); @Override Optional<Building> findWithPlanetIdAndType(UUID planetId, BuildingType type);  }### Answer:
@Test public void testInsert() throws Exception { UUID id = UUID.fromString("2e43f380-a6c9-11e4-bcd8-0800200c9a66"); Building building = new Building(id, BuildingType.GAS_REFINERY, 1, BasicScenario.Player1.Planet1.PLANET.getId()); sut.insert(building); List<Map<String, Object>> resultSet = select("SELECT * FROM building WHERE id = ?", id); assertThat(resultSet, hasSize(1)); verifyRow(resultSet.get(0), building); }