EitherOf5 extends Either implements AValue<A>, BValue<B>, CValue<C>, DValue<D>, EValue<E> { public static <A extends Message, B extends Message, C extends Message, D extends Message, E extends Message> EitherOf5<A, B, C, D, E> withA(A a) { checkNotNull(a); EitherOf5<A, B, C, D, E> result = new EitherOf5<>(a, 0); return result; } private  EitherOf5(Message value, int index); static EitherOf5<A, B, C, D, E> withA(A a); static EitherOf5<A, B, C, D, E> withB(B b); static EitherOf5<A, B, C, D, E> withC(C c); static EitherOf5<A, B, C, D, E> withD(D d); static EitherOf5<A, B, C, D, E> withE(E e); @Override A getA(); @Override B getB(); @Override C getC(); @Override D getD(); @Override E getE();  }
@Test @DisplayName("support equality") void supportEquality() { new EqualsTester().addEqualityGroup(eitherWithA, EitherOf5.withA(a)) .addEqualityGroup(eitherWithB) .addEqualityGroup(eitherWithC) .addEqualityGroup(eitherWithD) .addEqualityGroup(eitherWithE) .testEquals(); }