protected void resolveProvider( FileDialogOperation op ) {
    if ( op.getProvider() == null ) {
      if ( isVfsPath( op.getPath() ) ) {
        op.setProvider( VFSFileProvider.TYPE );
      } else if ( spoonSupplier.get().getRepository() != null ) {
        op.setProvider( RepositoryFileProvider.TYPE );
      } else {
        op.setProvider( LocalFileProvider.TYPE );
      }
    }
  }
@Test
  public void testResolveProvider_Repository() throws Exception  {
    // SETUP
    ProviderService mockProviderService = mock( ProviderService.class );
    VFSFileProvider mockVFSFileProvider = mock( VFSFileProvider.class );
    when( mockProviderService.get( VFSFileProvider.TYPE ) ).thenReturn( mockVFSFileProvider );
    when( mockVFSFileProvider.isSupported( any() ) ).thenReturn( false );
    Spoon mockSpoon = mock( Spoon.class );
    when( mockSpoon.getRepository() ).thenReturn( null );
    Repository mockRepository = mock( Repository.class );
    when( mockSpoon.getRepository() ).thenReturn( mockRepository );
    FileOpenSaveExtensionPoint testInstance = new FileOpenSaveExtensionPoint( mockProviderService, () -> mockSpoon );

    FileDialogOperation opRepository = new FileDialogOperation( FILE_OP_DUMMY_COMMAND  );
    opRepository.setProvider( null );
    opRepository.setPath( "//home/randomUser/randomFile.rpt" );

    // EXECUTE
    testInstance.resolveProvider( opRepository );

    // VERIFY
    assertEquals( RepositoryFileProvider.TYPE, opRepository.getProvider() );
  }