@Test
public void testCreateSecondaryCoincidence() {

    final Matchup matchup = new Matchup();
    final ReferenceObservation referenceObservation = new ReferenceObservation();
    referenceObservation.setTime(new Date(1000000000L));
    matchup.setRefObs(referenceObservation);
    final RelatedObservation relatedObservation = new RelatedObservation();
    final SamplingPoint samplingPoint = new SamplingPoint();
    samplingPoint.setReference2Time(1005000000L);
    final Coincidence coincidence = MatchupGenerator.createSecondaryCoincidence(samplingPoint, matchup, relatedObservation);
    assertNotNull(coincidence);
    assertSame(matchup, coincidence.getMatchup());
    assertSame(relatedObservation, coincidence.getObservation());
    assertEquals(5000, coincidence.getTimeDifference(), 1e-8);
}