Either { public static <Left, Right> Either<Left, Right> left(@Nonnull Left left) { return (Either<Left, Right>) new Either(checkNotNull(left, "left"), false); } private  Either(Object value, boolean right); static Either<Left, Right> left(@Nonnull Left left); static Either<Left, Right> right(@Nonnull Right right); boolean isLeft(); boolean isRight(); Left getLeft(); Right getRight(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test(expected = NullPointerException.class) public void leftValueCannotBeNull() { Either.<Integer,String>left(null); }