ContentStoreManagerFactoryImpl implements ContentStoreManagerFactory { @Override public ContentStoreManager create() throws ContentStoreException { DuracloudConfiguration dc = this.syncConfigurationManager.retrieveDuracloudConfiguration(); ContentStoreManager csm = new ContentStoreManagerImpl(dc.getHost(), String.valueOf(dc.getPort())); return csm; } @Autowired  ContentStoreManagerFactoryImpl(
        @Qualifier("syncConfigurationManager") SyncConfigurationManager syncConfigurationManager); @Override ContentStoreManager create();  }
@Test public void testCreate() throws ContentStoreException { SyncConfigurationManager syncConfigurationManager = createMock(SyncConfigurationManager.class); DuracloudConfiguration dc = createMock(DuracloudConfiguration.class); EasyMock.expect(syncConfigurationManager.retrieveDuracloudConfiguration()) .andReturn(dc); EasyMock.expect(dc.getHost()).andReturn("host"); EasyMock.expect(dc.getPort()).andReturn(8443); replay(); ContentStoreManagerFactoryImpl csf = new ContentStoreManagerFactoryImpl(syncConfigurationManager); Assert.assertNotNull(csf.create()); }