### Question:
Either implements Mappable<R, Either<L, ?>> { public static <L, R> Either<L, R> left(L value) { return Left.left(value); } protected  Either(); static Either<L, R> left(L value); static Either<L, R> right(R value); abstract boolean isLeft(); abstract boolean isRight(); R getRight(); L getLeft(); abstract R getRightOrElse(R defaultValue); abstract L getLeftOrElse(L defaultValue); abstract Either<L, S> map(UnaryFunction<? super R, ? extends S> function); abstract Either<S, R> mapLeft(UnaryFunction<? super L, ? extends S> function); abstract Either<L, S> mapRight(UnaryFunction<? super R, ? extends S> function); abstract Either<M, S> mapAll(
            UnaryFunction<? super L, ? extends M> leftMapper,
            UnaryFunction<? super R, ? extends S> rightMapper);  }### Answer:
@Test public void shouldBeEqualIfBothLeftOverSameValue() throws Exception { Either<String, Integer> first = Either.left("Hello"); Either<String, Long> second = Either.left("Hello"); boolean firstEqualsSecond = first.equals(second); boolean secondEqualsFirst = second.equals(first); assertThat(iterableWith(firstEqualsSecond, secondEqualsFirst), hasAllElementsEqualTo(true)); }
@Test public void shouldNotBeEqualIfBothLeftOverDifferentValues() throws Exception { Either<String, Integer> first = Either.left("Hello"); Either<String, Long> second = Either.left("Goodbye"); boolean firstEqualsSecond = first.equals(second); boolean secondEqualsFirst = second.equals(first); assertThat(iterableWith(firstEqualsSecond, secondEqualsFirst), hasAllElementsEqualTo(false)); }