@Test public void shouldGetRequisitionFromReport() throws Exception { Report report = make(a(ReportBuilder.defaultReport)); Long requisitionId = 12345L; Long userId = 212345L; Rnr requisition = report.getRequisition(requisitionId, userId); assertThat(requisition.getId(), is(requisitionId)); assertThat(requisition.getFullSupplyLineItems(), is(report.getProducts())); assertThat(requisition.getModifiedBy(), is(userId)); }
@JsonIgnore public Rnr getRequisition(Long requisitionId, Long modifiedBy) { Rnr requisition = new Rnr(requisitionId); requisition.setModifiedBy(modifiedBy); requisition.setFullSupplyLineItems(products); return requisition; }
Report { @JsonIgnore public Rnr getRequisition(Long requisitionId, Long modifiedBy) { Rnr requisition = new Rnr(requisitionId); requisition.setModifiedBy(modifiedBy); requisition.setFullSupplyLineItems(products); return requisition; } }
Report { @JsonIgnore public Rnr getRequisition(Long requisitionId, Long modifiedBy) { Rnr requisition = new Rnr(requisitionId); requisition.setModifiedBy(modifiedBy); requisition.setFullSupplyLineItems(products); return requisition; }  }
Report { @JsonIgnore public Rnr getRequisition(Long requisitionId, Long modifiedBy) { Rnr requisition = new Rnr(requisitionId); requisition.setModifiedBy(modifiedBy); requisition.setFullSupplyLineItems(products); return requisition; }  void validate(); Date getClientSubmittedTime(); @JsonIgnore Rnr getRequisition(Long requisitionId, Long modifiedBy); void validateForApproval(); static Report prepareForREST(final Rnr rnr); }
Report { @JsonIgnore public Rnr getRequisition(Long requisitionId, Long modifiedBy) { Rnr requisition = new Rnr(requisitionId); requisition.setModifiedBy(modifiedBy); requisition.setFullSupplyLineItems(products); return requisition; }  void validate(); Date getClientSubmittedTime(); @JsonIgnore Rnr getRequisition(Long requisitionId, Long modifiedBy); void validateForApproval(); static Report prepareForREST(final Rnr rnr);  }