Add test for the UnusedFields error type