@Test @DisplayName("have `updateState` method visible to package only") void haveUpdateStatePackagePrivate() { boolean methodFound = false; Method[] methods = AbstractEntity.class.getDeclaredMethods(); for (Method method : methods) { if ("updateState".equals(method.getName())) { Invokable<?, Object> updateState = Invokable.from(method); assertTrue(updateState.isPackagePrivate()); methodFound = true; } } assertTrue(methodFound, "Cannot check 'updateState(...)' in " + AbstractEntity.class); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AbstractEntity)) { return false; } AbstractEntity<?, ?> that = (AbstractEntity<?, ?>) o; return Objects.equals(id(), that.id()) && Objects.equals(state(), that.state()) && Objects.equals(version(), that.version()) && Objects.equals(lifecycleFlags(), that.lifecycleFlags()); }
AbstractEntity implements Entity<I, S>, HandlerLifecycle { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AbstractEntity)) { return false; } AbstractEntity<?, ?> that = (AbstractEntity<?, ?>) o; return Objects.equals(id(), that.id()) && Objects.equals(state(), that.state()) && Objects.equals(version(), that.version()) && Objects.equals(lifecycleFlags(), that.lifecycleFlags()); } }
AbstractEntity implements Entity<I, S>, HandlerLifecycle { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AbstractEntity)) { return false; } AbstractEntity<?, ?> that = (AbstractEntity<?, ?>) o; return Objects.equals(id(), that.id()) && Objects.equals(state(), that.state()) && Objects.equals(version(), that.version()) && Objects.equals(lifecycleFlags(), that.lifecycleFlags()); } protected  AbstractEntity(); protected  AbstractEntity(I id); protected  AbstractEntity(I id, Function<I, S> defaultState); }
AbstractEntity implements Entity<I, S>, HandlerLifecycle { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AbstractEntity)) { return false; } AbstractEntity<?, ?> that = (AbstractEntity<?, ?>) o; return Objects.equals(id(), that.id()) && Objects.equals(state(), that.state()) && Objects.equals(version(), that.version()) && Objects.equals(lifecycleFlags(), that.lifecycleFlags()); } protected  AbstractEntity(); protected  AbstractEntity(I id); protected  AbstractEntity(I id, Function<I, S> defaultState); @Override I id(); @Override final S state(); @Override String idAsString(); @Override String toString(); @Override LifecycleFlags getLifecycleFlags(); @Override final boolean isArchived(); @Override final boolean isDeleted(); @Override boolean lifecycleFlagsChanged(); @Override Version version(); Timestamp whenModified(); @OverridingMethodsMustInvokeSuper @Override void beforeInvoke(HandlerMethod<?, ?, ?, ?> method); @OverridingMethodsMustInvokeSuper @Override void afterInvoke(HandlerMethod<?, ?, ?, ?> method); final FluentLogger.Api at(Level logLevel); @Override boolean equals(Object o); @Override int hashCode(); }
AbstractEntity implements Entity<I, S>, HandlerLifecycle { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AbstractEntity)) { return false; } AbstractEntity<?, ?> that = (AbstractEntity<?, ?>) o; return Objects.equals(id(), that.id()) && Objects.equals(state(), that.state()) && Objects.equals(version(), that.version()) && Objects.equals(lifecycleFlags(), that.lifecycleFlags()); } protected  AbstractEntity(); protected  AbstractEntity(I id); protected  AbstractEntity(I id, Function<I, S> defaultState); @Override I id(); @Override final S state(); @Override String idAsString(); @Override String toString(); @Override LifecycleFlags getLifecycleFlags(); @Override final boolean isArchived(); @Override final boolean isDeleted(); @Override boolean lifecycleFlagsChanged(); @Override Version version(); Timestamp whenModified(); @OverridingMethodsMustInvokeSuper @Override void beforeInvoke(HandlerMethod<?, ?, ?, ?> method); @OverridingMethodsMustInvokeSuper @Override void afterInvoke(HandlerMethod<?, ?, ?, ?> method); final FluentLogger.Api at(Level logLevel); @Override boolean equals(Object o); @Override int hashCode();  }