### Question:
AisPositionA implements AisPosition, HasCommunications { static Integer extractRateOfTurn(AisExtractor extractor) { try { byte val = (byte) extractor.getSignedValue(42, 50); if (val == ROT_NOT_AVAILABLE) return null; else return (int) 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 testExtractRateOfTurn() { AisExtractor ex = createMock(AisExtractor.class); expect(ex.getSignedValue(anyInt(), anyInt())).andReturn(-128).atLeastOnce(); replay(ex); Integer heading = AisPositionA.extractRateOfTurn(ex); assertEquals(null, heading); }