ProvideDataBaseProperties { @Bean(name = "db.properties") public Properties getPropertiesFileFromApacheCloudStack() { return DbProperties.getDbProperties(); }  @Bean(name = "db.properties") Properties getPropertiesFileFromApacheCloudStack();  }
@Test public void getPropertiesFileFromApacheCloudStackTest() throws Exception { Properties properties = Mockito.mock(Properties.class); PowerMockito.mockStatic(DbProperties.class); PowerMockito.doReturn(properties).when(DbProperties.class, "getDbProperties"); Properties result = spy.getPropertiesFileFromApacheCloudStack(); PowerMockito.verifyStatic(); DbProperties.getDbProperties(); Assert.assertEquals(properties, result); }