### Question:
UIGit extends VCS implements IVCS { @Override public boolean pull() { if ( hasUncommittedChanges() ) { showMessageBox( BaseMessages.getString( PKG, "Dialog.Error" ), BaseMessages.getString( PKG, "Git.Dialog.UncommittedChanges.Message" ) ); return false; } if ( !hasRemote() ) { showMessageBox( BaseMessages.getString( PKG, "Dialog.Error" ), "Please setup a remote" ); return false; } try { git.fetch().setCredentialsProvider( credentialsProvider ).call(); return mergeBranch( Constants.DEFAULT_REMOTE_NAME + "/" + getBranch(), MergeStrategy.RECURSIVE.getName() ); } catch ( TransportException e ) { if ( e.getMessage().contains( "Authentication is required but no CredentialsProvider has been registered" ) || e.getMessage().contains( "not authorized" ) ) { if ( promptUsernamePassword() ) { return pull(); } } else { showMessageBox( BaseMessages.getString( PKG, "Dialog.Error" ), e.getMessage() ); } } catch ( Exception e ) { showMessageBox( BaseMessages.getString( PKG, "Dialog.Error" ), e.getMessage() ); } return false; }  @Override String getType(); @Override String getDirectory(); @Override String getAuthorName( String commitId ); @Override String getCommitMessage( String commitId ); @Override String getCommitId( String revstr ); @Override String getParentCommitId( String revstr ); @Override String getBranch(); @Override List<String> getLocalBranches(); @Override List<String> getBranches(); @Override String getRemote(); @Override void addRemote( String value ); @Override void removeRemote(); @Override boolean hasRemote(); @Override boolean commit( String authorName, String message ); @Override List<ObjectRevision> getRevisions(); @Override List<UIFile> getUnstagedFiles(); @Override List<UIFile> getStagedFiles(); @Override List<UIFile> getStagedFiles( String oldCommitId, String newCommitId ); @Override boolean hasStagedFiles(); @Override void initRepo( String baseDirectory ); @Override void openRepo( String baseDirectory ); @Override void closeRepo(); @Override void add( String filepattern ); @Override void rm( String filepattern ); @Override void reset( String name ); @Override void resetPath( String path ); @Override boolean rollback( String name ); @Override boolean pull(); @Override boolean push(); @Override boolean push( String type ); @Override String diff( String oldCommitId, String newCommitId ); @Override String diff( String oldCommitId, String newCommitId, String file ); @Override InputStream open( String file, String commitId ); boolean cloneRepo( String directory, String uri ); @Override void checkout( String name ); @Override void checkoutBranch( String name ); @Override void checkoutTag( String name ); @Override void revertPath( String path ); @Override boolean createBranch( String value ); @Override boolean deleteBranch( String name, boolean force ); @Override boolean merge(); @Override String getShortenedName( String name, String type ); @Override boolean isClean(); @Override List<String> getTags(); @Override boolean createTag( String name ); @Override boolean deleteTag( String name ); @Override String getExpandedName( String name, String type ); @Override void setCredential( String username, String password );  }### Answer:
@Test public void testPull() throws Exception { setupRemote(); Git git2 = new Git( db2 ); File sourceFile = new File( db2.getWorkTree(), "SomeFile.txt" ); FileUtils.writeStringToFile( sourceFile, "Hello world" ); git2.add().addFilepattern( "SomeFile.txt" ).call(); git2.commit().setMessage( "Initial commit for source" ).call(); PullResult pullResult = git.pull().call(); FileUtils.writeStringToFile( sourceFile, "Another change" ); git2.add().addFilepattern( "SomeFile.txt" ).call(); git2.commit().setMessage( "Some change in remote" ).call(); git2.close(); assertTrue( uiGit.pull() ); }