arquillian/arquillian-core — pull request #26 by hasalex (2011-12-26 11:22:31+00:00)
Title: ARQ-715 Add a getter for ProtocolMetaData.contexts

This would help to safely clone (and rewrite) metadata in extensions.
Without that method, we could forget some contexts.

For example :
for (Object context : metadata.getContexts()) {
if (! (context instanceof HTTPContext) ) {
newMetadata.addContext(context);
}
}

would be better than
newMetadata.addContext(metadata.getContext(JMXContext.class));
newMetadata.addContext(metadata.getContext(RMIContext.class));

Especially if a new context type is added in the future.