### Question:
NmeaSentence { public String getLatestHdop(){ if (isGGA()) { if (nmeaParts.length > 8 &&!Strings.isNullOrEmpty(nmeaParts[8])) { return nmeaParts[8]; } } else if (isGSA()) { if (nmeaParts.length > 16 &&!Strings.isNullOrEmpty(nmeaParts[16])) { return nmeaParts[16]; } } return null; } NmeaSentence(String nmeaSentence); boolean isLocationSentence(); String getLatestPdop(); String getLatestVdop(); String getLatestHdop(); String getGeoIdHeight(); String getAgeOfDgpsData(); String getDgpsId();  }### Answer:
@Test public void NmeaSentence_EmptyNmeaSentence_HDOPIsNull(){ NmeaSentence nmeaSentence = new NmeaSentence("$GPGGA,,,,,,,,,,,,,,*47"); assertThat("HDOP null by default", nmeaSentence.getLatestHdop(), nullValue()); }
@Test public void NmeaSentence_Null_NoValuesRead(){ NmeaSentence nmeaSentence = new NmeaSentence(null); assertThat("Null NMEA string", nmeaSentence.getLatestHdop(), nullValue()); }