### Question:
AisPositionB implements AisPosition, HasCommunications { @Override public int getMessageId() { return messageId; } AisPositionB(String message, String source, int padBits);  AisPositionB(String message, int padBits);  AisPositionB(AisExtractorFactory factory, String message, String source, int padBits); @Override int getMessageId(); @Override int getRepeatIndicator(); @Override int getMmsi(); int getSpare(); @Override Double getSpeedOverGroundKnots(); @Override boolean isHighAccuracyPosition(); @Override Double getLongitude(); @Override Double getLatitude(); @Override Double getCourseOverGround(); @Override Integer getTrueHeading(); @Override int getTimeSecondsOnly(); int getSpare2(); boolean isSotdmaUnit(); boolean isEquippedWithIntegratedDisplayForMessages12And14(); boolean isEquippedWithDscFunction(); boolean canOperateOverWholeMarineBand(); boolean canManageFrequenciesViaMessage22(); boolean isStationOperatingInAssignedMode(); @Override boolean isUsingRAIM(); boolean isITDMACommunicationState(); @Override Communications getCommunications(); @Override String getSource(); @Override String toString();  }### Answer:
@Test public void testIncorrectMessageId() { AisExtractorFactory factory = createMock(AisExtractorFactory.class); AisExtractor ex = createMock(AisExtractor.class); String message = ""; expect(factory.create(message, AisBaseStation.MIN_LENGTH, 0)).andReturn(ex).once(); expect(ex.getSignedValue(107, 134)).andReturn(0).anyTimes(); expect(ex.getSignedValue(79, 107)).andReturn(0).anyTimes(); expect(ex.getMessageId()).andReturn(0).atLeastOnce(); replay(factory, ex); try { new AisBaseStation(factory, "", "", 0); fail(); } catch (AisParseException e) { } verify(factory); }