### Question:
DrugOrder extends Order { @Override public DrugOrder cloneForRevision() { return cloneForRevisionHelper(new DrugOrder()); } DrugOrder();  DrugOrder(Integer orderId); @Override DrugOrder copy(); boolean isDrugOrder(); Concept getDoseUnits(); void setDoseUnits(Concept doseUnits); OrderFrequency getFrequency(); void setFrequency(OrderFrequency frequency); Boolean getAsNeeded(); void setAsNeeded(Boolean asNeeded); Double getQuantity(); void setQuantity(Double quantity); Concept getQuantityUnits(); void setQuantityUnits(Concept quantityUnits); Drug getDrug(); void setDrug(Drug drug); String getAsNeededCondition(); void setAsNeededCondition(String asNeededCondition); Concept getRoute(); void setRoute(Concept route); void setDose(Double dose); Double getDose(); Class<? extends DosingInstructions> getDosingType(); void setDosingType(Class<? extends DosingInstructions> dosingType); DosingInstructions getDosingInstructionsInstance(); Integer getNumRefills(); void setNumRefills(Integer numRefills); void setDosingInstructions(String dosingInstructions); String getDosingInstructions(); Integer getDuration(); void setDuration(Integer duration); Concept getDurationUnits(); void setDurationUnits(Concept durationUnits); String getBrandName(); void setBrandName(String brandName); Boolean getDispenseAsWritten(); void setDispenseAsWritten(Boolean dispenseAsWritten); @Override DrugOrder cloneForDiscontinuing(); @Override DrugOrder cloneForRevision(); void setAutoExpireDateBasedOnDuration(); @Override String toString(); void setDosing(DosingInstructions di); @Override boolean hasSameOrderableAs(Order otherOrder); String getDrugNonCoded(); void setDrugNonCoded(String drugNonCoded); boolean isNonCodedDrug(); static final long serialVersionUID; }### Answer:
@Test public void cloneForRevision_shouldSetTheRelevantFieldsForADCOrder() { Order order = new DrugOrder(); order.setAction(Order.Action.DISCONTINUE); Date date = new Date(); order.setDateActivated(date); order.setAutoExpireDate(date); order.setAccessionNumber("some number"); OrderUtilTest.setDateStopped(order, date); order.setPreviousOrder(new Order()); Order clone = order.cloneForRevision(); assertEquals(Order.Action.DISCONTINUE, clone.getAction()); assertEquals(order.getDateActivated(), clone.getDateActivated()); assertEquals(order.getPreviousOrder(), clone.getPreviousOrder()); assertNull(clone.getAutoExpireDate()); assertNull(clone.getDateStopped()); assertNull(clone.getAccessionNumber()); }