Fix a bug where Collections.unmodifiableMap's entrySet toArray method tries to wrap extra elements in the array, including the null marking the end of the elements. Also, fixed a bug where toArray() went through the array twice and cleaned up CollectionsTest (generics, sort order). Patch by: hhchan, jat Review by: jat git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7332 8db76d5a-ed1c-0410-87a9-c151d255dfc7