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

    MetadataRetryContext mockRetryContext = mock( MetadataRetryContext.class );
    ImportSummary expectedSummary = new ImportSummary();
    expectedSummary.setStatus( ImportStatus.ERROR );
    AvailabilityStatus availabilityStatus = new AvailabilityStatus( true, "test_message", null );
    when( synchronizationManager.isRemoteServerAvailable() ).thenReturn( availabilityStatus );
    doThrow( MetadataSyncServiceException.class )
        .when( metadataSyncPreProcessor )
        .handleDataValuePush( mockRetryContext, metadataSyncJobParameters );
    metadataSyncPreProcessor.handleDataValuePush( mockRetryContext, metadataSyncJobParameters );
}