ServiceFormRepository { public Service queryByCode(final String serviceCode) throws LMISException { return dbUtil.withDao(Service.class, dao -> dao.queryBuilder().where().eq("code", serviceCode).queryForFirst()); } @Inject  ServiceFormRepository(Context context); void batchCreateOrUpdateServiceList(final List<Service> serviceList); void createOrUpdate(Service service); Service queryByCode(final String serviceCode); List<Service> listAllActiveWithProgram(Program program);  }
@Test public void shouldQueryByCode() throws LMISException { Service result = serviceFormRepository.queryByCode(service.getCode()); assertThat(result, is(nullValue())); }