@Test public void shouldReturnNullIfGetByCodeGivenNull() { assertThat(repo.getByCode(null), nullValue()); }
public RegimenCategory getByCode(String code) { if(code == null) return null; return mapper.getByCode(code); }
RegimenCategoryRepository { public RegimenCategory getByCode(String code) { if(code == null) return null; return mapper.getByCode(code); } }
RegimenCategoryRepository { public RegimenCategory getByCode(String code) { if(code == null) return null; return mapper.getByCode(code); } @Autowired  RegimenCategoryRepository(RegimenCategoryMapper regimenCategoryMapper); }
RegimenCategoryRepository { public RegimenCategory getByCode(String code) { if(code == null) return null; return mapper.getByCode(code); } @Autowired  RegimenCategoryRepository(RegimenCategoryMapper regimenCategoryMapper); List<RegimenCategory> getAll(); RegimenCategory getByCode(String code); void save(RegimenCategory regimenCategory); }
RegimenCategoryRepository { public RegimenCategory getByCode(String code) { if(code == null) return null; return mapper.getByCode(code); } @Autowired  RegimenCategoryRepository(RegimenCategoryMapper regimenCategoryMapper); List<RegimenCategory> getAll(); RegimenCategory getByCode(String code); void save(RegimenCategory regimenCategory);  }