### Question:
DoublesPair implements ImmutableBean, Tuple, Comparable<DoublesPair>, Serializable { public static DoublesPair of(double first, double second) { return new DoublesPair(first, second); } private  DoublesPair(
      double first,
      double second); static DoublesPair of(double first, double second); static DoublesPair ofPair(Pair<Double, Double> pair); @FromString static DoublesPair parse(String pairStr); @Override int size(); @Override ImmutableList<Object> elements(); Pair<Double, Double> toPair(); @Override int compareTo(DoublesPair other); @Override boolean equals(Object obj); @Override int hashCode(); @Override @ToString String toString(); static DoublesPair.Meta meta(); @Override DoublesPair.Meta metaBean(); double getFirst(); double getSecond();  }### Answer:
@Test public void test_compareTo() { DoublesPair p12 = DoublesPair.of(1d, 2d); DoublesPair p13 = DoublesPair.of(1d, 3d); DoublesPair p21 = DoublesPair.of(2d, 1d); List<DoublesPair> list = new ArrayList<>(); list.add(p12); list.add(p13); list.add(p21); list.sort(Comparator.naturalOrder()); assertThat(list).containsExactly(p12, p13, p21); list.sort(Comparator.reverseOrder()); assertThat(list).containsExactly(p21, p13, p12); }
@Test public void test_equals() { DoublesPair a = DoublesPair.of(1d, 2.0d); DoublesPair a2 = DoublesPair.of(1d, 2.0d); DoublesPair b = DoublesPair.of(1d, 3.0d); DoublesPair c = DoublesPair.of(2d, 2.0d); DoublesPair d = DoublesPair.of(2d, 3.0d); assertThat(a) .isEqualTo(a) .isEqualTo(a2) .isNotEqualTo(b) .isNotEqualTo(c) .isNotEqualTo(d) .isNotEqualTo(null) .isNotEqualTo(ANOTHER_TYPE) .isNotEqualTo(Pair.of(Double.valueOf(1.1d), Double.valueOf(1.7d))) .hasSameHashCodeAs(a2); assertThat(b) .isNotEqualTo(a) .isEqualTo(b) .isNotEqualTo(c) .isNotEqualTo(d); assertThat(c) .isNotEqualTo(a) .isEqualTo(c) .isNotEqualTo(b) .isNotEqualTo(d); assertThat(d) .isNotEqualTo(a) .isNotEqualTo(b) .isNotEqualTo(c) .isEqualTo(d); }
@Test public void coverage() { DoublesPair test = DoublesPair.of(1d, 2.0d); TestHelper.coverImmutableBean(test); }
@Test public void test_serialization() { assertSerialization(DoublesPair.of(1d, 1.7d)); }
@Test public void test_jodaConvert() { assertJodaConvert(DoublesPair.class, DoublesPair.of(1d, 1.7d)); }