@SuppressWarnings( "unchecked" )
  public List<VFSConnectionProvider<VFSConnectionDetails>> getProviders( @NonNull ConnectionManager manager ) {
    return manager.getProvidersByType( VFSConnectionProvider.class )
      .stream()
      .map( provider -> (VFSConnectionProvider<VFSConnectionDetails>) provider )
      .collect( Collectors.toList() );
  }
@Test
  public void testGetProvidersReturnsListOfCastedItemsFromManager() {
    ConnectionProvider<? extends ConnectionDetails> provider1 =
      (ConnectionProvider<? extends ConnectionDetails>) mock( VFSConnectionProvider.class );
    ConnectionProvider<? extends ConnectionDetails> provider2 =
      (ConnectionProvider<? extends ConnectionDetails>) mock( VFSConnectionProvider.class );

    doReturn( Arrays.asList( provider1, provider2 ) )
      .when( connectionManager )
      .getProvidersByType( VFSConnectionProvider.class );

    List<VFSConnectionProvider<VFSConnectionDetails>> providers =
      vfsConnectionManagerHelper.getProviders( connectionManager );

    assertNotNull( providers );
    assertEquals( 2, providers.size() );
    assertSame( provider1, providers.get( 0 ) );
    assertSame( provider2, providers.get( 1 ) );
  }