### Question:
AisPositionA implements AisPosition, HasCommunications { @Override public Communications getCommunications() { return new Communications(extractor, 149); } 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 testCommicationsWithTime() { String m = "177KQJ5000G?tO`K>RA1wUbN0TKH"; AisPositionA p = new AisPositionA(m, 0); Communications comms = p.getCommunications(); assertEquals(1, comms.getSyncState()); assertEquals(1, comms.getSlotTimeout()); assertEquals(234, (int) comms.getMinutesUtc()); }
@Test public void testNullCommunicationsTime() { String m = "17P;1:0P00bKEn5nDKg9cOw82@De"; AisPositionA p = new AisPositionA(m, 0); Communications comms = p.getCommunications(); assertNull(comms.getMinuteUtc()); assertNull(comms.getHourUtc()); assertNull(comms.getMinutesUtc()); }