### Question:
AisPositionBExtended implements AisPosition, AisShipStatic { static Double extractCourseOverGround(AisExtractor extractor) { int val = extractor.getValue(112, 124); if (val == COG_NOT_AVAILABLE) return null; else return val / 10.0; } AisPositionBExtended(String message, int padBits);  AisPositionBExtended(String message, String source, int padBits);  AisPositionBExtended(AisExtractorFactory factory, String message, String source,
            int padBits); @Override int getMessageId(); @Override int getRepeatIndicator(); @Override int getMmsi(); @Override Double getSpeedOverGroundKnots(); @Override Double getLongitude(); @Override Double getLatitude(); @Override Double getCourseOverGround(); @Override Integer getTrueHeading(); @Override int getTimeSecondsOnly(); @Override String getName(); @Override int getShipType(); @Override Optional<Integer> getDimensionA(); @Override Optional<Integer> getDimensionB(); @Override Optional<Integer> getDimensionC(); @Override Optional<Integer> getDimensionD(); @Override Optional<Integer> getLengthMetres(); @Override Optional<Integer> getWidthMetres(); @Override String getSource(); @Override boolean isHighAccuracyPosition(); @Override boolean isUsingRAIM(); @Override String toString();  }### Answer:
@Test public void testExtractCourseOverGround() { AisExtractor ex = createMock(AisExtractor.class); expect(ex.getValue(anyInt(), anyInt())).andReturn(3600).atLeastOnce(); replay(ex); Double cog = AisPositionBExtended.extractCourseOverGround(ex); assertEquals(null, cog); }