### Question:
JooqTechnologyDAO extends AbstractJooqDAO implements TechnologyDAO { @Override public Optional<Technology> findWithPlayerId(UUID playerId, TechnologyType type) { Preconditions.checkNotNull(playerId, "playerId"); Preconditions.checkNotNull(type, "type"); LOGGER.debug("Finding technology with player id {} and type {}", playerId, type); TechnologyRecord record = context().selectFrom(TECHNOLOGY).where(TECHNOLOGY.PLAYER_ID.eq(playerId).and(TECHNOLOGY.TYPE.eq(type.getId()))).fetchOne(); if (record == null) { return Optional.empty(); } return Optional.of(fromRecord(record)); } @Inject  JooqTechnologyDAO(UnitOfWorkService unitOfWorkService); @Override Technologies findAllWithPlayerId(UUID playerId); @Override Optional<Technology> findWithPlayerId(UUID playerId, TechnologyType type); @Override void update(Technology technology); @Override void insert(Technology technology);  }### Answer:
@Test public void testFindWithPlayerId() throws Exception { Optional<Technology> technology = sut.findWithPlayerId(BasicScenario.Player1.TECHNOLOGY_1.getPlayerId(), BasicScenario.Player1.TECHNOLOGY_1.getType()); assertThat(technology.isPresent(), is(true)); assertThat(technology.get(), is(BasicScenario.Player1.TECHNOLOGY_1)); }
@Test public void testFindWithPlayerId2() throws Exception { Optional<Technology> technology = sut.findWithPlayerId(UUID.randomUUID(), BasicScenario.Player1.TECHNOLOGY_1.getType()); assertThat(technology.isPresent(), is(false)); }