@Test @RunWithCustomExecutor public void getLastDiffStatusShouldNullWhenNoProcessStarted() { OfferDiffService instance = spy(new OfferDiffService(distribution)); OfferDiffStatus status = instance.getLastOfferDiffStatus(); assertThat(status).isNull(); }
public OfferDiffStatus getLastOfferDiffStatus() { OfferDiffProcess offerDiffProcess = lastOfferDiffProcess.get(); if (offerDiffProcess == null) { return null; } else { return offerDiffProcess.getOfferDiffStatus(); } }
OfferDiffService { public OfferDiffStatus getLastOfferDiffStatus() { OfferDiffProcess offerDiffProcess = lastOfferDiffProcess.get(); if (offerDiffProcess == null) { return null; } else { return offerDiffProcess.getOfferDiffStatus(); } } }
OfferDiffService { public OfferDiffStatus getLastOfferDiffStatus() { OfferDiffProcess offerDiffProcess = lastOfferDiffProcess.get(); if (offerDiffProcess == null) { return null; } else { return offerDiffProcess.getOfferDiffStatus(); } } OfferDiffService(StorageDistribution distribution); }
OfferDiffService { public OfferDiffStatus getLastOfferDiffStatus() { OfferDiffProcess offerDiffProcess = lastOfferDiffProcess.get(); if (offerDiffProcess == null) { return null; } else { return offerDiffProcess.getOfferDiffStatus(); } } OfferDiffService(StorageDistribution distribution); boolean startOfferDiff(String offer1, String offer2, DataCategory dataCategory); boolean isRunning(); OfferDiffStatus getLastOfferDiffStatus(); }
OfferDiffService { public OfferDiffStatus getLastOfferDiffStatus() { OfferDiffProcess offerDiffProcess = lastOfferDiffProcess.get(); if (offerDiffProcess == null) { return null; } else { return offerDiffProcess.getOfferDiffStatus(); } } OfferDiffService(StorageDistribution distribution); boolean startOfferDiff(String offer1, String offer2, DataCategory dataCategory); boolean isRunning(); OfferDiffStatus getLastOfferDiffStatus();  }