### Question:
SyncConfigurationUtils { public static String readResourceFile(String file) throws SyncException { try (InputStream in = SyncUtils.class.getClassLoader().getResourceAsStream(file)) { if (in == null) { throw new SyncException("Resource '" + file + "' doesn't exist"); } return IOUtils.toString(in, "UTF-8"); } catch (IOException e) { throw new SyncException(e); } }  static void checkIfConfigurationIsValid(); static String readResourceFile(String file); static String readResourceFileAbsolutePath(String file); static SyncConfiguration parseJsonFileToSyncConfiguration(String path, ResourcePathType absolutePath); static SyncConfiguration parseJsonStringToSyncConfiguration(String value); static boolean isValidateJson(String json); static String writeSyncConfigurationToJsonString(SyncConfiguration syncConfiguration); static void writeSyncConfigurationToJsonFile(SyncConfiguration syncConfigurations, String absolutePath); static boolean resourceFileExists(String path); static boolean customConfigExists(String path); static ClientConfiguration getClientConfiguration(String clientName);  }### Answer:
@Test public void readResourceFile_shouldReadSampleFile() throws SyncException { final String sampleResourcePath = "sampleTextFile.txt"; final String expectedResult = "sampleContent"; String result = readResourceFile(sampleResourcePath); Assert.assertEquals(result, expectedResult); }
@Test(expected = SyncException.class) public void readResourceFile_shouldThrowIoExceptionIfFileDoesNotExist() throws SyncException { readResourceFile(NOT_EXISTING_FILE_PATH); }
@Test public void serializeMapToPrettyJson_shouldSerializeMapWithStrings() throws SyncException { Assert.assertEquals(readResourceFile(SAMPLE_PRETTY_SERIALIZED_MAP), prettySerialize(createSampleMap())); }
@Test public void serialize_shouldSerializeMapToJson() throws SyncException { Assert.assertEquals(readResourceFile(SAMPLE_SERIALIZED_MAP), serialize(createSampleMap())); }
@Test public void deserializeJsonToStringsMap_shouldDeserializeMapWithStrings() throws SyncException { Assert.assertEquals(createSampleMap(), SyncUtils.deserializeJsonToStringsMap(readResourceFile(SAMPLE_SERIALIZED_MAP))); }