TierModule extends AbstractModule { static String readTierFile() { try { return TIER_CONFIG_FILE.hasAppliedValue() ? Files.toString(TIER_CONFIG_FILE.get(), StandardCharsets.UTF_8) : Resources.toString( TierModule.class.getClassLoader().getResource(TIER_CONFIG_PATH), StandardCharsets.UTF_8); } catch (IOException e) { LOG.error("Error loading tier configuration file."); throw Throwables.propagate(e); } } TierModule(); @VisibleForTesting  TierModule(TierConfig tierConfig);   }
@Test public void testTierConfigArgumentNotSpecified() throws Exception { String tierFileContents = readTierFile(); assertFalse(Strings.isNullOrEmpty(tierFileContents)); assertEquals( tierFileContents, Files.toString( new File(TierModule.class.getClassLoader().getResource(TIER_CONFIG_PATH).getFile()), StandardCharsets.UTF_8)); }