CamelCompositeContext implements Context { @Override public Set<Property> getProperties() { Set<Property> properties = new HashSet<Property>(); properties.addAll(getProperties(Scope.EXCHANGE)); properties.addAll(getProperties(Scope.MESSAGE)); return properties; } CamelCompositeContext(Exchange exchange);  CamelCompositeContext(Exchange exchange, Message message); @Override void mergeInto(Context context); @Override Property getProperty(String name); @Override Property getProperty(String name, Scope scope); @Override @SuppressWarnings("unchecked") T getPropertyValue(String name); @Override Set<Property> getProperties(); @Override Set<Property> getProperties(Scope scope); @Override Set<Property> getProperties(String label); @Override void removeProperty(Property property); @Override void removeProperties(); @Override void removeProperties(Scope scope); @Override void removeProperties(String label); @Override Property setProperty(String name, Object val); @Override Property setProperty(String name, Object val, Scope scope); @Override Context setProperties(Set<Property> properties);  }
@Test public void testHeaderCaseSensitivityFromExchange() throws Exception { String lowerCaseHeaderKey = "lowercase_header"; String lowerCaseHeaderValue = "lowercase_value"; String mixedCaseHeaderKey = "mixedCASE_HEADER"; String mixedCaseHeaderValue = "mixedCASE_VALUE"; String upperCaseHeaderKey = "UPPERCASE_HEADER"; String upperCaseHeaderValue = "UPPERCASE_VALUE"; DefaultMessage message = new DefaultMessage(); message.setHeader(lowerCaseHeaderKey, lowerCaseHeaderValue); message.setHeader(mixedCaseHeaderKey, mixedCaseHeaderValue); message.setHeader(upperCaseHeaderKey, upperCaseHeaderValue); CamelCompositeContext ctx = new CamelCompositeContext(new DefaultExchange(new SwitchYardCamelContextImpl(false)), message); boolean foundLowerCaseValue = false; boolean foundMixedCaseValue = false; boolean foundUpperCaseValue = false; for (Property p : ctx.getProperties(Scope.MESSAGE)) { System.out.println(p.getName() + "=>"+p.getValue()); if (lowerCaseHeaderKey.equals(p.getName())) { foundLowerCaseValue = true; } if (mixedCaseHeaderKey.equals(p.getName())) { foundMixedCaseValue = true; } if (upperCaseHeaderKey.equals(p.getName())) { foundUpperCaseValue = true; } } if (!foundLowerCaseValue || !foundMixedCaseValue || !foundUpperCaseValue) { StringBuilder failMessage = new StringBuilder(); failMessage.append("Could not find MESSAGE-scoped properties: "); if (!foundLowerCaseValue) { failMessage.append(lowerCaseHeaderKey); failMessage.append(", "); } if (!foundMixedCaseValue) { failMessage.append(mixedCaseHeaderKey); failMessage.append(", "); } if (!foundUpperCaseValue) { failMessage.append(upperCaseHeaderKey); failMessage.append(", "); } failMessage.delete(failMessage.length() - 2, failMessage.length() - 1); Assert.fail(failMessage.toString()); } }