public ConnectionDetails getConnectionDetails( IMetaStore metaStore, String key, String name ) {
    ConnectionProvider<? extends ConnectionDetails> connectionProvider = getConnectionProvider( key );
    if ( connectionProvider != null ) {
      Class<? extends ConnectionDetails> clazz = connectionProvider.getClassType();
      return loadElement( getMetaStoreFactory( metaStore, clazz ), name );
    }
    return null;
  }
@Test
  public void testSaveConnection() {
    addOne();

    TestConnectionWithBucketsDetails testConnectionDetails1 =
      (TestConnectionWithBucketsDetails) connectionManager
        .getConnectionDetails( TestConnectionWithBucketsProvider.SCHEME, CONNECTION_NAME );
    assertEquals( CONNECTION_NAME, testConnectionDetails1.getName() );
  }