}
@SuppressWarnings({"ToArrayCallWithZeroLengthArrayArgument"})
public void testKeys() {
TIntLongMap raw_map = new TIntLongHashMap();
Map<Integer,Long> map = TDecorators.wrap( raw_map );
map.put( KEY_ONE, Long.valueOf( 10 ) );
map.put( KEY_TWO, Long.valueOf( 20 ) );
assertEquals( 2, map.size() );
Integer[] keys = map.keySet().toArray( new Integer[map.size()] );
assertEquals( 2, keys.length );
List<Integer> keys_list = Arrays.asList( keys );
assertTrue( keys_list.contains( KEY_ONE ) );
assertTrue( keys_list.contains( KEY_TWO ) );
//noinspection ToArrayCallWithZeroLengthArrayArgument
Integer[] keys2 = map.keySet().toArray( new Integer[0] );
assertEquals( 2, keys2.length );
List<Integer> keys_list2 = Arrays.asList( keys2 );
assertTrue( keys_list2.contains( KEY_ONE ) );
assertTrue( keys_list2.contains( KEY_TWO ) );
int element_count = 20;
raw_map = new TIntLongHashMap( element_count, 0.5f, Integer.MIN_VALUE, Long.MIN_VALUE );
map = TDecorators.wrap( raw_map );
for ( int i = 0; i < element_count; i++ ) {
map.put( Integer.valueOf( i ), Long.valueOf( i * i ) );
}
assertEquals( element_count, map.size() );