@Test public void getNonExistentClientByName() { assertThat(clientDAO.getClientByName("non-existent")).isEmpty(); }
public Optional<Client> getClientByName(String name) { ClientsRecord r = dslContext.fetchOne(CLIENTS, CLIENTS.NAME.eq(name)); return Optional.ofNullable(r).map(clientMapper::map); }
ClientDAO { public Optional<Client> getClientByName(String name) { ClientsRecord r = dslContext.fetchOne(CLIENTS, CLIENTS.NAME.eq(name)); return Optional.ofNullable(r).map(clientMapper::map); } }
ClientDAO { public Optional<Client> getClientByName(String name) { ClientsRecord r = dslContext.fetchOne(CLIENTS, CLIENTS.NAME.eq(name)); return Optional.ofNullable(r).map(clientMapper::map); } private  ClientDAO(DSLContext dslContext, ClientMapper clientMapper,
      RowHmacGenerator rowHmacGenerator); }
ClientDAO { public Optional<Client> getClientByName(String name) { ClientsRecord r = dslContext.fetchOne(CLIENTS, CLIENTS.NAME.eq(name)); return Optional.ofNullable(r).map(clientMapper::map); } private  ClientDAO(DSLContext dslContext, ClientMapper clientMapper,
      RowHmacGenerator rowHmacGenerator); long createClient(String name, String user, String description,
      @Nullable URI spiffeId); void deleteClient(Client client); void sawClient(Client client, @Nullable Principal principal); Optional<Client> getClientByName(String name); Optional<Client> getClientBySpiffeId(URI spiffeId); Optional<Client> getClientById(long id); ImmutableSet<Client> getClients(); }
ClientDAO { public Optional<Client> getClientByName(String name) { ClientsRecord r = dslContext.fetchOne(CLIENTS, CLIENTS.NAME.eq(name)); return Optional.ofNullable(r).map(clientMapper::map); } private  ClientDAO(DSLContext dslContext, ClientMapper clientMapper,
      RowHmacGenerator rowHmacGenerator); long createClient(String name, String user, String description,
      @Nullable URI spiffeId); void deleteClient(Client client); void sawClient(Client client, @Nullable Principal principal); Optional<Client> getClientByName(String name); Optional<Client> getClientBySpiffeId(URI spiffeId); Optional<Client> getClientById(long id); ImmutableSet<Client> getClients();  }