@Test
public void testFindTaskWithLegacyMigration() {

    long deadlineTimestamp = titusRuntime.getClock().wallTime() + 1_000;
    Task legacyTask = toLegacyTask(TASK1, deadlineTimestamp);
    when(relocationServiceClient.findTaskRelocationPlan(TASK1.getId())).thenReturn(Mono.just(Optional.empty()));
    taskRelocationDataInjector.injectIntoTask(legacyTask.getId(), Observable.just(legacyTask)).toBlocking().first();
    assertThat(legacyTask).isEqualToComparingFieldByField(legacyTask);
}