@Test
public void testShouldVerifyIfStopSyncReturnTrueIfDHISVersionMismatch() throws IOException
{

    String versionSnapshot = "{\"system:\": {\"date\":\"2016-06-24T05:27:25.128+0000\", \"version\": \"2.26\"}, \"name\":\"testVersion\",\"created\":\"2016-05-26T11:43:59.787+0000\",\"type\":\"BEST_EFFORT\",\"id\":\"ktwh8PHNwtB\"," +
        "\"hashCode\":\"12wa32d4f2et3tyt5yu6i\"}";
    String systemNodeString = "{\"date\":\"2016-06-24T05:27:25.128+0000\", \"version\": \"2.26\"}";
    SystemInfo systemInfo = new SystemInfo();
    systemInfo.setVersion( "2.25" );
    when( systemService.getSystemInfo() ).thenReturn( systemInfo );
    when( metadataSystemSettingService.getStopMetadataSyncSetting() ).thenReturn( true );
    ObjectMapper mapper = new ObjectMapper();
    JsonNode jsonNode = mapper.readTree( systemNodeString );
    when( renderService.getSystemObject( any( ByteArrayInputStream.class), eq( RenderFormat.JSON ) ) ).thenReturn( jsonNode);
    boolean shouldStopSync = metadataSyncDelegate.shouldStopSync( versionSnapshot );
    assertTrue(shouldStopSync);
}