@Test public void shouldGetFacilityProgramProductISA() { FacilityProgramProduct expectedFpp = new FacilityProgramProduct(); when(facilityProgramProductRepository.getByCodes(any(String.class), any(String.class), any(String.class))).thenReturn(expectedFpp); BaseModel returnedFpp = handler.getExisting(fppISA); assertThat((FacilityProgramProduct)returnedFpp, is(expectedFpp)); }
@Override protected BaseModel getExisting(BaseModel record) { FacilityProgramProductISADTO fppISA = (FacilityProgramProductISADTO)record; return repository.getByCodes(fppISA.getFacility().getCode(), fppISA.getProgram().getCode(), fppISA.getProduct().getCode()); }
FacilityProgramProductISAHandler extends AbstractModelPersistenceHandler { @Override protected BaseModel getExisting(BaseModel record) { FacilityProgramProductISADTO fppISA = (FacilityProgramProductISADTO)record; return repository.getByCodes(fppISA.getFacility().getCode(), fppISA.getProgram().getCode(), fppISA.getProduct().getCode()); } }
FacilityProgramProductISAHandler extends AbstractModelPersistenceHandler { @Override protected BaseModel getExisting(BaseModel record) { FacilityProgramProductISADTO fppISA = (FacilityProgramProductISADTO)record; return repository.getByCodes(fppISA.getFacility().getCode(), fppISA.getProgram().getCode(), fppISA.getProduct().getCode()); }  }
FacilityProgramProductISAHandler extends AbstractModelPersistenceHandler { @Override protected BaseModel getExisting(BaseModel record) { FacilityProgramProductISADTO fppISA = (FacilityProgramProductISADTO)record; return repository.getByCodes(fppISA.getFacility().getCode(), fppISA.getProgram().getCode(), fppISA.getProduct().getCode()); }  @Override String getMessageKey(); }
FacilityProgramProductISAHandler extends AbstractModelPersistenceHandler { @Override protected BaseModel getExisting(BaseModel record) { FacilityProgramProductISADTO fppISA = (FacilityProgramProductISADTO)record; return repository.getByCodes(fppISA.getFacility().getCode(), fppISA.getProgram().getCode(), fppISA.getProduct().getCode()); }  @Override String getMessageKey();  }