Removed insertion-order dependent check for JAVA-511

The test used containsExactly assertion which assumes that the elements
appear in order.  This is not possible due to the collection
implementation and has to be replaced by containsOnly, which ignores
insertion order.