### Question:
JooqPlanetDAO extends AbstractJooqDAO implements PlanetDAO { @Override public Optional<Planet> findWithId(UUID id) { Preconditions.checkNotNull(id, "id"); LOGGER.debug("Finding planet with id {}", id); Record record = context().select().from(PLANET).where(PLANET.ID.eq(id)).fetchOne(); if (record == null) { return Optional.empty(); } return Optional.of(PlanetMapper.fromRecord(record)); } @Inject  JooqPlanetDAO(UnitOfWorkService unitOfWorkService); @Override void insert(Planet planet); @Override List<Planet> findWithOwnerId(UUID ownerId); @Override Optional<Planet> findWithLocation(Location location); @Override void update(Planet planet); @Override List<Planet> findAll(); @Override Optional<Planet> findWithId(UUID id); @Override List<PlanetWithOwner> findInRange(int galaxyMin, int galaxyMax, int solarSystemMin, int solarSystemMax, int planetMin, int planetMax);  }### Answer:
@Test public void testFindWithId() throws Exception { Optional<Planet> planet = sut.findWithId(BasicScenario.Player1.Planet1.PLANET.getId()); assertThat(planet.isPresent(), is(true)); assertThat(planet.get(), is(BasicScenario.Player1.Planet1.PLANET)); }
@Test public void testFindWithId2() throws Exception { Optional<Planet> planet = sut.findWithId(UUID.fromString("b74b7d6c-846f-4000-82e5-6e9aab62f8d6")); assertThat(planet.isPresent(), is(false)); }