class PhysicalDataValueEq implements IValueEq<PhysicalData> {

    @Override
    public boolean equal(PhysicalData a, PhysicalData b) {
        return same(a.getAltitude(), b.getAltitude())
                && same(a.getDepth(), b.getDepth())
                && same(a.getLatitude(), b.getLatitude())
                && same(a.getLight(), b.getLight())
                && same(a.getLongitude(), b.getLongitude())
                && same (a.getOxygen(), b.getOxygen())
                && same(a.getSalinity(), b.getSalinity())
                && same(a.getTemperature(), b.getTemperature());
    }

}

class PhysicalDataValueEqTest {

    @Test
    public void toleranceTest3() {

        IValueEq<PhysicalData> eq = new PhysicalDataValueEq(0.001);
        PhysicalData a = new ImmutablePhysicalData(null, 10F, 10F, 10D, 10F, null, 10D, 10F, 10F, 10F);
        PhysicalData b = new ImmutablePhysicalData(null, 10F, 10F, 10.002, 10F, null, 10D, 10F, 10F, 10F);
        assertFalse(eq.equal(a, b));
    }

}