### Question:
Strings { public static String getDecimalDegrees(double decimaldegrees) { NumberFormat nf = NumberFormat.getInstance(); nf.setMaximumFractionDigits(6); return nf.format(decimaldegrees); }  static String getDescriptiveDurationString(int numberOfSeconds,
                                                      Context context); static String getBearingDescription(float bearingDegrees,
                                               Context context); static String cleanDescriptionForXml(String desc); static String cleanDescriptionForJson(String desc); static String getIsoDateTime(Date dateToFormat); static String getIsoDateTimeFormat(); static String getIsoCalendarDate(Date dateToFormat); static String getIsoCalendarDateFormat(); static String getReadableDateTime(Date dateToFormat); static boolean isNullOrEmpty(String text); static String htmlDecode(String text); static String getBuildSerial(); static String getFormattedFileName(); static String getFormattedFileName(Session session, PreferenceHelper ph); static String getFormattedCustomFileName(String baseName, Calendar calendar, PreferenceHelper ph); static int toInt(String number, int defaultVal); static String getSpeedDisplay(Context context, double metersPerSecond, boolean imperial); static String getDistanceDisplay(Context context, double meters, boolean imperial, boolean autoscale); static String getTimeDisplay(Context context, long milliseconds); static Map<String, String> getAvailableLocales(Context context); static String getSanitizedMarkdownForFaqView(String md); static String getDegreesMinutesSeconds(double decimaldegrees, boolean isLatitude); static String getDegreesDecimalMinutes(double decimaldegrees, boolean isLatitude); static String getDecimalDegrees(double decimaldegrees); static String getFormattedLatitude(double decimaldegrees); static String getFormattedLongitude(double decimaldegrees); static String getDetectedActivityName(DetectedActivity detectedActivity);  }### Answer:
@Test public void getDecimalDegrees_BasicLatitude(){ double lat = 59.28392417439d; String expected = "59" + getDecimalSeparator() + "283924"; String actual = Strings.getDecimalDegrees(lat); assertThat("Decimal degrees formatted to 6 places", actual, is(expected)); }
@Test public void getDecimalDegrees_ShortLocation_NoPaddedZeros(){ double lat = 59.28d; String expected = "59" + getDecimalSeparator() + "28"; String actual = Strings.getDecimalDegrees(lat); assertThat("Decimal degrees no padded zero", actual, is(expected)); }