@Test(expected=NullPointerException.class) public void enrich_Judgment_EnrichmentTag_JudgmentNull() { EnrichmentTag enrichmentTag = new EnrichmentTag(); enrichmentTag.setTagType("TAG_TYPE_1"); enrichmentTag.setJudgmentId(judgment.getId()); judgmentEnrichmentService.enrich(null, enrichmentTag); }
public <T extends Judgment> void enrich(T judgment) { Preconditions.checkNotNull(judgment); List<EnrichmentTag> enrichmentTags = enrichmentTagRepository.findAllByJudgmentId(judgment.getId()); enrich(judgment, enrichmentTags); }
JudgmentEnrichmentService { public <T extends Judgment> void enrich(T judgment) { Preconditions.checkNotNull(judgment); List<EnrichmentTag> enrichmentTags = enrichmentTagRepository.findAllByJudgmentId(judgment.getId()); enrich(judgment, enrichmentTags); } }
JudgmentEnrichmentService { public <T extends Judgment> void enrich(T judgment) { Preconditions.checkNotNull(judgment); List<EnrichmentTag> enrichmentTags = enrichmentTagRepository.findAllByJudgmentId(judgment.getId()); enrich(judgment, enrichmentTags); }  }
JudgmentEnrichmentService { public <T extends Judgment> void enrich(T judgment) { Preconditions.checkNotNull(judgment); List<EnrichmentTag> enrichmentTags = enrichmentTagRepository.findAllByJudgmentId(judgment.getId()); enrich(judgment, enrichmentTags); }  T findOneAndEnrich(long judgmentId); void unenrichAndSave(Judgment judgment); void enrich(T judgment); void enrich(T judgment, List<EnrichmentTag> enrichmentTags); void enrich(T judgment, EnrichmentTag enrichmentTag); @Autowired void setJudgmentRepository(JudgmentRepository judgmentRepository); @Autowired void setEnrichmentTagRepository(EnrichmentTagRepository enrichmentTagRepository); @Autowired void setEnrichmentTagApplierManager(EnrichmentTagApplierManager enrichmentTagApplierManager); @Autowired void setEntityManager(EntityManager entityManager); }
JudgmentEnrichmentService { public <T extends Judgment> void enrich(T judgment) { Preconditions.checkNotNull(judgment); List<EnrichmentTag> enrichmentTags = enrichmentTagRepository.findAllByJudgmentId(judgment.getId()); enrich(judgment, enrichmentTags); }  T findOneAndEnrich(long judgmentId); void unenrichAndSave(Judgment judgment); void enrich(T judgment); void enrich(T judgment, List<EnrichmentTag> enrichmentTags); void enrich(T judgment, EnrichmentTag enrichmentTag); @Autowired void setJudgmentRepository(JudgmentRepository judgmentRepository); @Autowired void setEnrichmentTagRepository(EnrichmentTagRepository enrichmentTagRepository); @Autowired void setEnrichmentTagApplierManager(EnrichmentTagApplierManager enrichmentTagApplierManager); @Autowired void setEntityManager(EntityManager entityManager);  }