@Test void failuresShouldBeSerializedAsEmptyArrayWhenNone() throws Exception { ReIndexingExecutionFailures failures = new ReIndexingExecutionFailures(ImmutableList.of(), ImmutableList.of()); assertThatJson(objectMapper.writeValueAsString(SerializableReIndexingExecutionFailures.from(failures))) .when(Option.IGNORING_ARRAY_ORDER) .isEqualTo("{}"); }
public static SerializableReIndexingExecutionFailures from(ReIndexingExecutionFailures reIndexingExecutionFailures) { return new SerializableReIndexingExecutionFailures( reIndexingExecutionFailures.messageFailures() .stream() .map(failure -> new SerializableReIndexingExecutionFailures.SerializableReIndexingFailure(failure.getMailboxId(), failure.getUid())) .collect(Guavate.toImmutableList())); }
SerializableReIndexingExecutionFailures { public static SerializableReIndexingExecutionFailures from(ReIndexingExecutionFailures reIndexingExecutionFailures) { return new SerializableReIndexingExecutionFailures( reIndexingExecutionFailures.messageFailures() .stream() .map(failure -> new SerializableReIndexingExecutionFailures.SerializableReIndexingFailure(failure.getMailboxId(), failure.getUid())) .collect(Guavate.toImmutableList())); } }
SerializableReIndexingExecutionFailures { public static SerializableReIndexingExecutionFailures from(ReIndexingExecutionFailures reIndexingExecutionFailures) { return new SerializableReIndexingExecutionFailures( reIndexingExecutionFailures.messageFailures() .stream() .map(failure -> new SerializableReIndexingExecutionFailures.SerializableReIndexingFailure(failure.getMailboxId(), failure.getUid())) .collect(Guavate.toImmutableList())); } SerializableReIndexingExecutionFailures(List<SerializableReIndexingFailure> failures); }
SerializableReIndexingExecutionFailures { public static SerializableReIndexingExecutionFailures from(ReIndexingExecutionFailures reIndexingExecutionFailures) { return new SerializableReIndexingExecutionFailures( reIndexingExecutionFailures.messageFailures() .stream() .map(failure -> new SerializableReIndexingExecutionFailures.SerializableReIndexingFailure(failure.getMailboxId(), failure.getUid())) .collect(Guavate.toImmutableList())); } SerializableReIndexingExecutionFailures(List<SerializableReIndexingFailure> failures); static SerializableReIndexingExecutionFailures from(ReIndexingExecutionFailures reIndexingExecutionFailures); @JsonValue Multimap<String, SerializableReIndexingFailure> failures(); }
SerializableReIndexingExecutionFailures { public static SerializableReIndexingExecutionFailures from(ReIndexingExecutionFailures reIndexingExecutionFailures) { return new SerializableReIndexingExecutionFailures( reIndexingExecutionFailures.messageFailures() .stream() .map(failure -> new SerializableReIndexingExecutionFailures.SerializableReIndexingFailure(failure.getMailboxId(), failure.getUid())) .collect(Guavate.toImmutableList())); } SerializableReIndexingExecutionFailures(List<SerializableReIndexingFailure> failures); static SerializableReIndexingExecutionFailures from(ReIndexingExecutionFailures reIndexingExecutionFailures); @JsonValue Multimap<String, SerializableReIndexingFailure> failures();  }