### Question:
Configuration { public static void setGpsDataIfValid(GpsMode mode, String gpsCoordinates) throws ConfigurationItemException { LoggingService.logDebug(MODULE_NAME, "Start set Gps Data If Valid "); if (!isValidCoordinates(gpsCoordinates)) { throw new ConfigurationItemException("Incorrect GPS coordinates value: " + gpsCoordinates + "\n" + "Correct format is <DDD.DDDDD(lat),DDD.DDDDD(lon)> (GPS DD format)"); } setGpsMode(mode); if (gpsCoordinates != null && !StringUtils.isBlank(gpsCoordinates) && !gpsCoordinates.isEmpty()) { setGpsCoordinates(gpsCoordinates.trim()); } LoggingService.logDebug(MODULE_NAME, "Finished set Gps Data If Valid "); }  static String getRouterHost(); static void setRouterHost(String routerHost); static int getRouterPort(); static void setRouterPort(int routerPort); static int getStatusReportFreqSeconds(); static int getPingControllerFreqSeconds(); static int getSpeedCalculationFreqMinutes(); static int getMonitorSshTunnelStatusFreqSeconds(); static int getMonitorContainersStatusFreqSeconds(); static int getMonitorRegistriesStatusFreqSeconds(); static long getGetUsageDataFreqSeconds(); static String getDockerApiVersion(); static int getSetSystemTimeFreqSeconds(); static boolean isWatchdogEnabled(); static void setWatchdogEnabled(boolean watchdogEnabled); static int getStatusFrequency(); static void setStatusFrequency(int statusFrequency); static int getChangeFrequency(); static void setChangeFrequency(int changeFrequency); static int getDeviceScanFrequency(); static void setDeviceScanFrequency(int deviceScanFrequency); static String getGpsCoordinates(); static void setGpsCoordinates(String gpsCoordinates); static GpsMode getGpsMode(); static void setGpsMode(GpsMode gpsMode); static void resetToDefault(); static int getPostDiagnosticsFreq(); static void setPostDiagnosticsFreq(int postDiagnosticsFreq); static ArchitectureType getFogType(); static void setFogType(ArchitectureType fogType); static boolean isDeveloperMode(); static void setDeveloperMode(boolean developerMode); static HashMap<String, String> getOldNodeValuesForParameters(Set<String> parameters, Document document); static void saveConfigUpdates(); static HashMap<String, String> setConfig(Map<String, Object> commandLineMap, boolean defaults); static void setGpsDataIfValid(GpsMode mode, String gpsCoordinates); static void writeGpsToConfigFile(); static void loadConfig(); static void loadConfigSwitcher(); static String getAccessToken(); static String getControllerUrl(); static String getControllerCert(); static String getNetworkInterface(); static String getDockerUrl(); static float getDiskLimit(); static float getMemoryLimit(); static String getDiskDirectory(); static float getCpuLimit(); static String getIofogUuid(); static int getLogFileCount(); static float getLogDiskLimit(); static String getLogDiskDirectory(); static void setLogDiskDirectory(String logDiskDirectory); static void setAccessToken(String accessToken); static void setIofogUuid(String iofogUuid); static String getConfigReport(); static String getNetworkInterfaceInfo(); static Document getCurrentConfig(); static String getCurrentConfigPath(); static String setupConfigSwitcher(ConfigSwitcherState state); static void load(); static void setupSupervisor(); static String getIpAddressExternal(); static void setIpAddressExternal(String ipAddressExternal); static String getLogLevel(); static void setLogLevel(String logLevel); static long getDockerPruningFrequency(); static void setDockerPruningFrequency(long dockerPruningFrequency); static long getAvailableDiskThreshold(); static void setAvailableDiskThreshold(long availableDiskThreshold); static int getReadyToUpgradeScanFrequency(); static void setReadyToUpgradeScanFrequency(int readyToUpgradeScanFrequency); static boolean debugging; }### Answer:
@Test public void testSetGpsDataIfValid() { try { Configuration.setGpsDataIfValid(GpsMode.OFF, "-7.6878,00.100"); assertEquals("New Value",GpsMode.OFF, Configuration.getGpsMode()); assertEquals("New Value","-7.6878,00.100", Configuration.getGpsCoordinates()); } catch (Exception e) { fail("This should not happen"); } }