### Question:
JooqBuildingDAO extends AbstractJooqDAO implements BuildingDAO { @Override public void update(Building building) { Preconditions.checkNotNull(building, "building"); LOGGER.debug("Updating building {}", building); context().update(BUILDING) .set(BUILDING.TYPE, building.getType().getId()) .set(BUILDING.LEVEL, building.getLevel()) .set(BUILDING.PLANET_ID, building.getPlanetId()) .where(BUILDING.ID.eq(building.getId())) .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 testUpdate() throws Exception { Building building = BasicScenario.Player1.Planet1.COMMAND_CENTER; Building updatedBuilding = new Building(building.getId(), BuildingType.RESEARCH_CENTER, 2, BasicScenario.Player1.Planet1.COMMAND_CENTER.getPlanetId()); sut.update(updatedBuilding); List<Map<String, Object>> resultSet = select("SELECT * FROM building WHERE id = ?", building.getId()); assertThat(resultSet, hasSize(1)); verifyRow(resultSet.get(0), updatedBuilding); }