@Test @DisplayName("convert null timestamp to default") void convertNullTimestamp() { Timestamp timestamp = currentTime(); assertThat(nullToDefault(timestamp)).isEqualTo(timestamp); assertThat(nullToDefault(null)).isEqualTo(Timestamp.getDefaultInstance()); }
@VisibleForTesting static Timestamp nullToDefault(@Nullable Timestamp timestamp) { return timestamp == null ? Timestamp.getDefaultInstance() : timestamp; }
ProjectionRepository extends EventDispatchingRepository<I, P, S> { @VisibleForTesting static Timestamp nullToDefault(@Nullable Timestamp timestamp) { return timestamp == null ? Timestamp.getDefaultInstance() : timestamp; } }
ProjectionRepository extends EventDispatchingRepository<I, P, S> { @VisibleForTesting static Timestamp nullToDefault(@Nullable Timestamp timestamp) { return timestamp == null ? Timestamp.getDefaultInstance() : timestamp; }  }
ProjectionRepository extends EventDispatchingRepository<I, P, S> { @VisibleForTesting static Timestamp nullToDefault(@Nullable Timestamp timestamp) { return timestamp == null ? Timestamp.getDefaultInstance() : timestamp; }  @Override @OverridingMethodsMustInvokeSuper void registerWith(BoundedContext context); @OverridingMethodsMustInvokeSuper @Override P create(I id); @Override final void store(P entity); @Override final ImmutableSet<EventClass> messageClasses(); @Override final ImmutableSet<EventClass> domesticEventClasses(); @Override final ImmutableSet<EventClass> externalEventClasses(); @OverridingMethodsMustInvokeSuper @Override final boolean canDispatch(EventEnvelope event); CatchUpId catchUp(Timestamp since, @Nullable Set<I> ids); CatchUpId catchUpAll(Timestamp since); @OverridingMethodsMustInvokeSuper @Override void close(); }
ProjectionRepository extends EventDispatchingRepository<I, P, S> { @VisibleForTesting static Timestamp nullToDefault(@Nullable Timestamp timestamp) { return timestamp == null ? Timestamp.getDefaultInstance() : timestamp; }  @Override @OverridingMethodsMustInvokeSuper void registerWith(BoundedContext context); @OverridingMethodsMustInvokeSuper @Override P create(I id); @Override final void store(P entity); @Override final ImmutableSet<EventClass> messageClasses(); @Override final ImmutableSet<EventClass> domesticEventClasses(); @Override final ImmutableSet<EventClass> externalEventClasses(); @OverridingMethodsMustInvokeSuper @Override final boolean canDispatch(EventEnvelope event); CatchUpId catchUp(Timestamp since, @Nullable Set<I> ids); CatchUpId catchUpAll(Timestamp since); @OverridingMethodsMustInvokeSuper @Override void close();  }