@Test( expected = MetadataSyncServiceException.class )
public void testHandleMetadataVersionsListShouldThrowExceptionIfAnyIssueWithMetadataDifference() throws Exception
{

    AvailabilityStatus availabilityStatus = new AvailabilityStatus( true, "test_message", null );
    when( synchronizationManager.isRemoteServerAvailable() ).thenReturn( availabilityStatus );
    MetadataRetryContext mockRetryContext = mock( MetadataRetryContext.class );
    MetadataVersion currentVersion = new MetadataVersion();
    currentVersion.setType( VersionType.BEST_EFFORT );
    currentVersion.setName( "test_version" );
    currentVersion.setCreated( new Date() );
    currentVersion.setHashCode( "samplehashcode" );
    List<MetadataVersion> listOfVersions = new ArrayList<>();
    listOfVersions.add( currentVersion );
    when( metadataVersionDelegate.getMetaDataDifference( currentVersion ) ).thenThrow( new MetadataSyncServiceException( "test_message" ) );
    metadataSyncPreProcessor.handleMetadataVersionsList( mockRetryContext, currentVersion );
}