### Question:
AccuRevRemoveCommand extends AbstractAccuRevCommand { public RemoveScmResult remove( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) throws ScmException { return (RemoveScmResult) execute( repository, fileSet, parameters ); } AccuRevRemoveCommand( ScmLogger logger ); RemoveScmResult remove( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters );  }### Answer:
@Test public void testRemove() throws Exception { final ScmFileSet testFileSet = new ScmFileSet( basedir, new File( "src/main/java/Foo.java" ) ); List<File> removedFiles = Collections.singletonList( new File( "removed/file" ) ); when( accurev.defunct( basedir, testFileSet.getFileList(), "A deleted file" ) ).thenReturn( removedFiles ); AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() ); CommandParameters commandParameters = new CommandParameters(); commandParameters.setString( CommandParameter.MESSAGE, "A deleted file" ); RemoveScmResult result = command.remove( repo, testFileSet, commandParameters ); assertThat( result.isSuccess(), is( true ) ); assertThat( result.getRemovedFiles().size(), is( 1 ) ); assertHasScmFile( result.getRemovedFiles(), "removed/file", ScmFileStatus.DELETED ); }
@Test public void testAddFailed() throws Exception { final ScmFileSet testFileSet = new ScmFileSet( basedir, new File( "src/main/java/Foo.java" ) ); when( accurev.defunct( basedir, testFileSet.getFileList(), "A deleted file" ) ).thenReturn( null ); AccuRevRemoveCommand command = new AccuRevRemoveCommand( getLogger() ); CommandParameters commandParameters = new CommandParameters(); commandParameters.setString( CommandParameter.MESSAGE, "A deleted file" ); RemoveScmResult result = command.remove( repo, testFileSet, commandParameters ); assertThat( result.isSuccess(), is( false ) ); assertThat( result.getProviderMessage(), notNullValue() ); }