Avoid raw types in tests to catch casting issues