StellarResult { public static StellarResult terminate() { return new StellarResult(Status.TERMINATE, ""); } private  StellarResult(Status status, Object value); private  StellarResult(Status status, Throwable exception); static StellarResult success(Object value); static StellarResult error(Throwable exception); static StellarResult error(String errorMessage); static StellarResult noop(); static StellarResult terminate(); boolean isSuccess(); boolean isError(); boolean isTerminate(); boolean isValueNull(); Status getStatus(); Optional<Object> getValue(); Optional<Throwable> getException(); @Override String toString();  }
@Test public void testTerminate() { StellarResult result = StellarResult.terminate(); assertNotNull(result); assertTrue(result.getValue().isPresent()); assertFalse(result.getException().isPresent()); assertEquals(StellarResult.Status.TERMINATE, result.getStatus()); assertFalse(result.isSuccess()); assertFalse(result.isError()); assertTrue(result.isTerminate()); }