@Test
public void testHandleMessage() throws Throwable {

	// Arrange
	final String data = "1";
	final long dataLong = 1L;
	final String xacmlCcdId = "xacmlCcdId";
	final String xacmlCcd = "xacmlCcd";
	final byte[] xacmlCcdBytes = xacmlCcd.getBytes();
	final boolean force = false;
	final String patientMrn = "patientMrn";
	final SignedConsentDto signedConsentDto = mock(SignedConsentDto.class);
	when(consentGetter.getSignedConsentDto(dataLong)).thenReturn(
			signedConsentDto);
	when(signedConsentDto.getXacmlCcdId()).thenReturn(xacmlCcdId);
	when(signedConsentDto.getXacmlCcd()).thenReturn(xacmlCcdBytes);
	when(signedConsentDto.getPatientMrn()).thenReturn(patientMrn);
	// Act
	sut.handleMessage(data);
	// Assert
	verify(polRepClient, times(1)).addPolicies(
			argThat(matching((PolicyContentContainerDto r) -> new String(r
					.getPolicies().get(0).getPolicy()).equals(xacmlCcd))),
			eq(force));
	verify(auditService, times(1)).audit(eq(sut), anyString(),
			eq(POLREP_ADD_CONSENT), eq(patientMrn),
			anyMapOf(PredicateKey.class, String.class));
}