Code example for PropertyResourceBundle

0
    private ResourceBundle bundle; 
    private ScalarPropertyHaver fromBundle; 
 
    @Before public final void initializeProperties() throws Exception { 
        inputStream = new FileInputStream(propertiesFile); 
        bundle = new PropertyResourceBundle(inputStream); 
        fromBundle = binder.bind(bundle); 
    } 
 
    @After public final void closeInputStream() { 
        closeQuietly(inputStream); 
    } 
 
    @Test public void loadingFromPropertiesObject() throws Exception { 
        ScalarPropertyHaver fromFile = binder.bind(propertiesFile); 
 
        assertPropertiesEqual(fromFile, fromBundle); 
    } 
 
    @Override protected Class<ScalarPropertyHaver> boundType() { 
Experience pair programming with AI  Get Codota for Java