@Test(expected = GriffinException.NotFoundException.class) public void testGetMeasuresByIdWithFileNotFoundException() { given(measureRepo.findByIdAndDeleted(1L, false)).willReturn(null); service.getMeasureById(1); }
@Override public Measure getMeasureById(long id) { Measure measure = measureRepo.findByIdAndDeleted(id, false); if (measure == null) { throw new GriffinException .NotFoundException(MEASURE_ID_DOES_NOT_EXIST); } return measure; }
MeasureServiceImpl implements MeasureService { @Override public Measure getMeasureById(long id) { Measure measure = measureRepo.findByIdAndDeleted(id, false); if (measure == null) { throw new GriffinException .NotFoundException(MEASURE_ID_DOES_NOT_EXIST); } return measure; } }
MeasureServiceImpl implements MeasureService { @Override public Measure getMeasureById(long id) { Measure measure = measureRepo.findByIdAndDeleted(id, false); if (measure == null) { throw new GriffinException .NotFoundException(MEASURE_ID_DOES_NOT_EXIST); } return measure; }  }
MeasureServiceImpl implements MeasureService { @Override public Measure getMeasureById(long id) { Measure measure = measureRepo.findByIdAndDeleted(id, false); if (measure == null) { throw new GriffinException .NotFoundException(MEASURE_ID_DOES_NOT_EXIST); } return measure; }  @Override List<? extends Measure> getAllAliveMeasures(String type); @Override Measure getMeasureById(long id); @Override List<Measure> getAliveMeasuresByOwner(String owner); @Override Measure createMeasure(Measure measure); @Override Measure updateMeasure(Measure measure); @Override void deleteMeasureById(Long measureId); @Override void deleteMeasures(); }
MeasureServiceImpl implements MeasureService { @Override public Measure getMeasureById(long id) { Measure measure = measureRepo.findByIdAndDeleted(id, false); if (measure == null) { throw new GriffinException .NotFoundException(MEASURE_ID_DOES_NOT_EXIST); } return measure; }  @Override List<? extends Measure> getAllAliveMeasures(String type); @Override Measure getMeasureById(long id); @Override List<Measure> getAliveMeasuresByOwner(String owner); @Override Measure createMeasure(Measure measure); @Override Measure updateMeasure(Measure measure); @Override void deleteMeasureById(Long measureId); @Override void deleteMeasures();  }