@Test
public void testRelativePosition() {

    TemporalPrimitive other;
    //relative position between Instant objects
    cal.set(2000, 0, 1);
    Position position = new DefaultPosition(cal.getTime());
    other = new DefaultInstant(position);
    RelativePosition result = temporalPrimitive1.relativePosition(other);
    assertFalse(temporalPrimitive2.relativePosition(other).equals(result));
    //relative position between Instant and Period
    Instant instant1 = new DefaultInstant(new DefaultPosition(cal.getTime()));
    Instant instant2 = (DefaultInstant) temporalPrimitive2;
    other = new DefaultPeriod(instant1, instant2);
    result = temporalPrimitive1.relativePosition(other);
    assertFalse(temporalPrimitive2.relativePosition(other).equals(result));
    //relative position between Period onbjects
    temporalPrimitive1 = new DefaultPeriod(new DefaultInstant(position1), instant1);
    cal.set(2020, 9, 1);
    temporalPrimitive2 = new DefaultPeriod(instant2, new DefaultInstant(new DefaultPosition(cal.getTime())));
    result = temporalPrimitive1.relativePosition(other);
    assertFalse(temporalPrimitive2.relativePosition(other).equals(result));
}