@Test public void testGetFromDiskConfigSuccessFileIOException() { File configFile = new File("errorConfigFile"); ParseCurrentConfigController currentConfigController = new ParseCurrentConfigController(configFile); ParseConfig config = currentConfigController.getFromDisk(); assertNull(config); }
ParseConfig getFromDisk() { JSONObject json; try { json = ParseFileUtils.readFileToJSONObject(currentConfigFile); } catch (IOException | JSONException e) { return null; } return ParseConfig.decode(json, ParseDecoder.get()); }
ParseCurrentConfigController { ParseConfig getFromDisk() { JSONObject json; try { json = ParseFileUtils.readFileToJSONObject(currentConfigFile); } catch (IOException | JSONException e) { return null; } return ParseConfig.decode(json, ParseDecoder.get()); } }
ParseCurrentConfigController { ParseConfig getFromDisk() { JSONObject json; try { json = ParseFileUtils.readFileToJSONObject(currentConfigFile); } catch (IOException | JSONException e) { return null; } return ParseConfig.decode(json, ParseDecoder.get()); } ParseCurrentConfigController(File currentConfigFile); }
ParseCurrentConfigController { ParseConfig getFromDisk() { JSONObject json; try { json = ParseFileUtils.readFileToJSONObject(currentConfigFile); } catch (IOException | JSONException e) { return null; } return ParseConfig.decode(json, ParseDecoder.get()); } ParseCurrentConfigController(File currentConfigFile); Task<Void> setCurrentConfigAsync(final ParseConfig config); Task<ParseConfig> getCurrentConfigAsync(); }
ParseCurrentConfigController { ParseConfig getFromDisk() { JSONObject json; try { json = ParseFileUtils.readFileToJSONObject(currentConfigFile); } catch (IOException | JSONException e) { return null; } return ParseConfig.decode(json, ParseDecoder.get()); } ParseCurrentConfigController(File currentConfigFile); Task<Void> setCurrentConfigAsync(final ParseConfig config); Task<ParseConfig> getCurrentConfigAsync();  }