AMQP10JMSProperties { public DeserializationPolicy getDeserializationPolicy() { return deserializationPolicy; }  String getRemoteUrl(); void setRemoteUrl(String remoteUrl); String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); String getClientId(); void setClientId(String clientId); boolean isReceiveLocalOnly(); void setReceiveLocalOnly(boolean receiveLocalOnly); boolean isReceiveNoWaitLocalOnly(); void setReceiveNoWaitLocalOnly(boolean receiveNoWaitLocalOnly); DeserializationPolicy getDeserializationPolicy(); Pool getPool(); void setPool(Pool pool);  }
@Test public void testWhiteListDefaultToEmpty() { JmsConnectionFactory factory = new AMQP10JMSConnectionFactoryFactory(this.properties).createConnectionFactory(JmsConnectionFactory.class); JmsDefaultDeserializationPolicy policy = (JmsDefaultDeserializationPolicy) factory.getDeserializationPolicy(); assertEquals(1, policy.getWhiteList().length()); }
@Test public void testBlackListDefaultToEmpty() { JmsConnectionFactory factory = new AMQP10JMSConnectionFactoryFactory(this.properties).createConnectionFactory(JmsConnectionFactory.class); JmsDefaultDeserializationPolicy policy = (JmsDefaultDeserializationPolicy) factory.getDeserializationPolicy(); assertEquals(0, policy.getBlackList().length()); }
@Test public void testDeserializationPolicyValuesAreApplied() { this.properties.getDeserializationPolicy().setWhiteList(Collections.singletonList("org.apache.qpid.proton.*")); this.properties.getDeserializationPolicy().setBlackList(Collections.singletonList("org.apache.activemq..*")); JmsConnectionFactory factory = new AMQP10JMSConnectionFactoryFactory(this.properties).createConnectionFactory(JmsConnectionFactory.class); JmsDefaultDeserializationPolicy policy = (JmsDefaultDeserializationPolicy) factory.getDeserializationPolicy(); assertEquals("org.apache.qpid.proton.*", policy.getWhiteList()); assertEquals("org.apache.activemq..*", policy.getBlackList()); }