@Test public void filterProperties_message_handlesOnSetException() throws JMSException {

  Message message = mock(Message.class);
  when(message.getPropertyNames()).thenReturn(
    Collections.enumeration(Collections.singletonList("JMS_SQS_DeduplicationId")));
  when(message.getObjectProperty("JMS_SQS_DeduplicationId")).thenReturn("");
  doThrow(new IllegalArgumentException()).when(message).setObjectProperty(anyString(), eq(""));
  assertThatCode(() -> PropertyFilter.filterProperties(message,
    Collections.singleton("b3"))).doesNotThrowAnyException();
}