### Question:
ObservationFinder { static void assignToSamplingPoint(boolean primarySensor, SamplingPoint point, PolarOrbitingPolygon polygon) { if (primarySensor) { point.setReference(polygon.getId()); point.setReferenceTime(polygon.getTime()); } else { point.setReference2(polygon.getId()); point.setReference2Time(polygon.getTime()); } } ObservationFinder(PersistenceManager persistenceManager); void findPrimarySensorObservations(List<SamplingPoint> samples, Parameter parameter); void findSecondarySensorObservations(List<SamplingPoint> samples, Parameter parameter); void findObservations(List<SamplingPoint> samples, Parameter parameter, boolean primarySensor);  }### Answer:
@Test public void testAssignToSamplingPoint_primary() throws ParseException { final PolarOrbitingPolygon polygon = createAtsrPolygon(12); final SamplingPoint samplingPoint = new SamplingPoint(); ObservationFinder.assignToSamplingPoint(true, samplingPoint, polygon); assertEquals(12, samplingPoint.getReference()); assertEquals(1041384411000L, samplingPoint.getReferenceTime()); }
@Test public void testAssignToSamplingPoint_secondary() throws ParseException { final PolarOrbitingPolygon polygon = createAtsrPolygon(14); final SamplingPoint samplingPoint = new SamplingPoint(); ObservationFinder.assignToSamplingPoint(false, samplingPoint, polygon); assertEquals(14, samplingPoint.getReference2()); assertEquals(1041384411000L, samplingPoint.getReference2Time()); }