@Test
  public void compareNumeric() {
    final INumericMetaData m1 =
        ValueFactory.createNumericMetaData(-10.0, 10.0, 1.0, 8.0, 0.0, 9.0, 2, "socks");
    final INumericMetaData m2 =
        ValueFactory.createNumericMetaData(-10.0, 10.0, 1.0, 8.0, 0.0, 9.0, 2, "socks");
    final INumericMetaData m3 =
        ValueFactory.createNumericMetaData(-10.0, 10.0, 1.0, 8.0, 0.0, 9.0, 20, "socks");

    assertEquals("socks", m2.getUnits());

    assertEquals(m1, m2);
    assertEquals(m2, m1);
    assertNotSame(m1, m2);
    assertTrue(!m1.equals(m3));
  }
  /** Check the metadata comparison inside the value comparison. */
  @Test
  public void compareInValues() {
    final ITimestamp stamp = TimestampFactory.now();
    final ISeverity severity = ValueFactory.createMajorSeverity();
    final String status = "Test";
    final INumericMetaData meta_a =
        ValueFactory.createNumericMetaData(0, 1, 0, 1, 0, 1, 2, "stuff");
    IValue a =
        new DoubleValue(
            stamp, severity, status, meta_a, IValue.Quality.Original, new double[] {1.0, 2.0});

    final INumericMetaData meta_b =
        ValueFactory.createNumericMetaData(0, 1, 0, 1, 0, 1, 2, "stuff");
    IValue b =
        new DoubleValue(
            stamp, severity, status, meta_b, IValue.Quality.Original, new double[] {1.0, 2.0});
    assertEquals(a, b);

    a = new StringValue(stamp, severity, status, IValue.Quality.Original, new String[] {"Fred"});

    assertTrue(!a.equals(b));
    b = new StringValue(stamp, severity, status, IValue.Quality.Original, new String[] {"Fred"});
    assertEquals(a, b);
  }