assertEquals(Status.Error, e.getStatus());
}
@Test
public void testProperties() {
Exchange e = new ExchangeImpl(Pattern.InOnly);
assertNotNull(e.getProperties());
e.setProperty("name", "value");
assertEquals("value", e.getProperty("name"));
assertNotNull(e.getProperty("name", String.class));
assertNotNull(e.getProperty("name", byte[].class));
assertNotNull(e.removeProperty("name"));
assertNull(e.getProperty("name"));
e.setProperty(Exchange.class, new ExchangeImpl(Pattern.InOnly));
assertNotNull(e.getProperty(Exchange.class.getName(), Exchange.class));
assertNotNull(e.getProperty(Exchange.class));
assertNotNull(e.removeProperty(Exchange.class));
assertNull(e.getProperty(Exchange.class));
assertTrue(e.getProperties().isEmpty());
e.setProperties(createMap("key", "val"));
assertNotNull(e.getProperties());
assertFalse(e.getProperties().isEmpty());
e.setProperties(null);
assertNull(e.getProperty("name"));
assertNull(e.getProperty(Exchange.class));
assertNull(e.getProperty("name", byte[].class));
assertNull(e.removeProperty("name"));
e.setProperties(null);
e.setProperty(Exchange.class, new ExchangeImpl(Pattern.InOnly));
assertNotNull(e.getProperty(Exchange.class));
e.setProperties(null);
e.setProperty("name", "value");
assertNotNull(e.getProperty("name"));
}