ConfigurationProperties { private void loadProperties(InputStream inputStream) { try { properties = new Properties(); properties.load(inputStream); } catch (IOException e) { throw new IllegalStateException("Failed to load properties " + PROPERTIES_FILE_NAME + " file from assets", e); } } ConfigurationProperties(AssetManager assetManager); int getConfigurationVersionSerial(); static final String CENTRAL_CONFIGURATION_SERVICE_URL_PROPERTY; static final String CONFIGURATION_UPDATE_INTERVAL_PROPERTY; static final String CONFIGURATION_VERSION_SERIAL_PROPERTY; static final String CONFIGURATION_DOWNLOAD_DATE_PROPERTY; static final String PROPERTIES_FILE_NAME; }
@Test public void loadProperties() throws IOException { when(assetManager.open(anyString())).thenReturn(getClass().getClassLoader().getResourceAsStream(ConfigurationProperties.PROPERTIES_FILE_NAME)); ConfigurationProperties configurationProperties = new ConfigurationProperties(assetManager); assertEquals("https: assertSame(7, configurationProperties.getConfigurationUpdateInterval()); }