### Question:
AisPositionA implements AisPosition, HasCommunications { static Integer extractTrueHeading(AisExtractor extractor) { try { int val = extractor.getValue(128, 137); if (val == TRUE_HEADING_NOT_AVAILABLE) return null; else if (val > 359) { return null; } else return val; } catch (AisParseException e) { return null; } } AisPositionA(String message, String source, int padBits);  AisPositionA(String message, int padBits);  AisPositionA(AisExtractorFactory factory, String message, String source, int padBits); @Override int getMessageId(); @Override int getRepeatIndicator(); @Override int getMmsi(); NavigationalStatus getNavigationalStatus(); Integer getRateOfTurn(); @Override Double getSpeedOverGroundKnots(); @Override boolean isHighAccuracyPosition(); @Override Double getLongitude(); @Override Double getLatitude(); @Override Double getCourseOverGround(); @Override Integer getTrueHeading(); @Override int getTimeSecondsOnly(); int getSpecialManoeuvreIndicator(); int getSpare(); @Override boolean isUsingRAIM(); @Override Communications getCommunications(); @Override String getSource(); @Override String toString();  }### Answer:
@Test public void testExtractTrueHeading() { AisExtractor ex = createMock(AisExtractor.class); expect(ex.getValue(anyInt(), anyInt())).andReturn(511).atLeastOnce(); replay(ex); Integer heading = AisPositionA.extractTrueHeading(ex); assertEquals(null, heading); }