compile with -Xlint:unchecked and fixed unchecked/unsafe operations in tests