UiIndicator { @NonNull public static <T> UiIndicator<T> idle() { return new UiIndicator<>(State.Idle, null); } private  UiIndicator(@NonNull State state, @Nullable T data); @NonNull static UiIndicator<T> idle(); @NonNull static UiIndicator<T> loading(); @NonNull static UiIndicator<T> loading(@NonNull T data); @NonNull static UiIndicator<T> error(); @NonNull static UiIndicator<T> error(@NonNull T data); @NonNull static UiIndicator<T> success(); @NonNull static UiIndicator<T> success(@NonNull T data); @NonNull State getState(); @NonNull Optional<T> getData(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void idle() throws Exception { final UiIndicator uiIndicator = UiIndicator.idle(); assertEquals(UiIndicator.State.Idle, uiIndicator.getState()); assertEquals(null, uiIndicator.getData().orNull()); }