@Test
public void testShouldThrowExceptionWhenImportServiceFails()
{

    syncParams.setImportParams( new MetadataImportParams() );
    syncParams.setVersion( metadataVersion );
    when( metadataImportService.importMetadata( syncParams.getImportParams() ) )
        .thenThrow( new MetadataSyncServiceException( "" ) );
    expectedException.expect( MetadataSyncImportException.class );
    metadataSyncImportHandler.importMetadata( syncParams, expectedMetadataSnapshot );
    verify( metadataVersionDelegate, never() ).addNewMetadataVersion( metadataVersion );
}