Pair implements Map.Entry<A, B>, Writeable { public final List<Object> toList() { return java.util.Arrays.asList(first, second); } @ConstructorProperties({"first", "second"})  Pair(@Nullable final A first, @Nullable final B second); static Pair<A, B> of(@Nullable final A first, @Nullable final B second); @Nullable static Pair<String, String> from(@Nonnull final String stringPair); final A getFirst(); final B getSecond(); @Override final boolean equals(final Object obj); @Override final int hashCode(); @Override String toString(); @Override final void writeTo(final Appendable appendable); final List<Object> toList(); static Map<K, V> asMap(final Pair<K, ? extends V>... pairs); @Override final A getKey(); @Override final B getValue(); @Override final B setValue(final B value);  }
@Test public void testToList() { Pair<String, String> pair1 = Pair.of("5", ", adf\"klf "); Pair<String, String> pair2 = Pair.from(pair1.toString()); Assert.assertEquals(pair1, pair2); }