@Test
public void testCreateReferenceObservation_insituPoint() {

    final SamplingPoint samplingPoint = new SamplingPoint(1, 2, 76636483L, Double.NaN);
    samplingPoint.setIndex(87845);
    samplingPoint.setDatasetName("87845");
    samplingPoint.setReferenceLon(32.2);
    samplingPoint.setReferenceLat(43.3);
    samplingPoint.setReferenceTime(876636483L);
    samplingPoint.setInsituDatasetId(InsituDatasetId.radiometer);
    final DataFile datafile = new DataFile();
    final ReferenceObservation referenceObservation = MatchupGenerator.createReferenceObservation("Bottle", samplingPoint, datafile);
    assertNotNull(referenceObservation);
    assertEquals("87845", referenceObservation.getName());
    assertEquals("Bottle", referenceObservation.getSensor());
    final PGgeometry location = referenceObservation.getLocation();
    final PGgeometry point = referenceObservation.getPoint();
    assertSame(location, point);
    final Point locationPoint = location.getGeometry().getPoint(0);
    assertEquals(32.2, locationPoint.getX(), 1e-8);
    assertEquals(43.3, locationPoint.getY(), 1e-8);
    assertEquals(876636483L, referenceObservation.getTime().getTime());
    assertEquals(800000.0, referenceObservation.getTimeRadius(), 1e-8);
    assertSame(datafile, referenceObservation.getDatafile());
    assertEquals(0, referenceObservation.getRecordNo());
    assertEquals(InsituDatasetId.radiometer.getValue(), referenceObservation.getDataset());
    assertEquals(Constants.MATCHUP_REFERENCE_FLAG_UNDEFINED, referenceObservation.getReferenceFlag());
}