@Test
public void testShouldNotThrowExceptionWhenDHISVersionsMismatch()
    throws DhisVersionMismatchException
{

    MetadataSyncParams syncParams = Mockito.mock( MetadataSyncParams.class );
    MetadataVersion metadataVersion = new MetadataVersion( "testVersion", VersionType.ATOMIC );
    String expectedMetadataSnapshot = "{\"date\":\"2016-05-24T05:27:25.128+0000\", \"version\": \"2.26\"}";
    when( syncParams.getVersion() ).thenReturn( metadataVersion );
    when( metadataVersionDelegate.downloadMetadataVersionSnapshot( metadataVersion ) )
        .thenReturn( expectedMetadataSnapshot );
    when( metadataSyncDelegate.shouldStopSync( expectedMetadataSnapshot ) ).thenReturn( false );
    when( metadataVersionService.isMetadataPassingIntegrity( metadataVersion, expectedMetadataSnapshot ) )
        .thenReturn( true );
    metadataSyncService.doMetadataSync( syncParams );
}