@Override
  public void deleteVersionsBeforeDate( RepositoryElementInterface element, Date beforeDate ) throws KettleException {
    try {
      Serializable fileId = element.getObjectId().getId();
      deleteVersionsBeforeDate( fileId, beforeDate );
    } catch ( Exception e ) {
      processDeleteException( e );
    }
  }
@Test
  public void deleteVersionsBeforeDate() throws KettleException {
    IUnifiedRepository mockRepo = mock( IUnifiedRepository.class );
    final HashMap<String, List<VersionSummary>> versionListMap = processVersionMap( mockRepo );

    UnifiedRepositoryPurgeService purgeService = new UnifiedRepositoryPurgeService( mockRepo );
    String fileId = "1";
    Date beforeDate = getDate( "01/02/2006" );

    purgeService.deleteVersionsBeforeDate( element1, beforeDate );

    verifyDateBeforeDeletion( versionListMap, mockRepo, fileId, beforeDate );
    verify( mockRepo, never() ).deleteFileAtVersion( eq( "2" ), anyString() );
  }