During Lecter's first meeting with Clarice in The Silence of the Lambs (1991), Lecter flashes back to a time when he ate a census taker's liver "with some fava beans and a nice Chianti". His chilling admission about the murder does not come as a surprise but what does boggle my mind is how vague he was with respect to the murder. Hannibal mentioned the census taker's attempt to "test" him as his pretext. What exactly does he mean by this? We know from the novels and the films that Hannibal has a tendency to consume the rude. He saw the rude as cattle, even going so far as to call them "free range rude". By that alone, we are led to believe that the census taker must have done something to offend his sense of dignity. But what exactly could the census taker have done?
Lecter mentions the census taker in Hannibal. He makes special note of the fact that the census taker arrived at a particularly ungodly hour.
Hannibal: Last time someone rang my doorbell this early, it was a census taker.
HANNIBAL S02E06 - Futamono
Ask for basic biographical details, probably
Census-takers ask questions, and questioning somebody is a way of "testing" them.
What might a census-taker even ask a person? Here's what CensusCounts.org (an independent, pro-census group) says:
What will a census taker ask me?
The census taker will ONLY ask the questions that appear on the census form...: address, phone number, number of people living in your home, whether you rent or own your home, and basic information about each resident (name, age, birthdate, gender, relationship to you, race, ethnicity).
The census taker will NOT ask for your citizenship status; driver’s license; Social Security Number; credit card, bank, or other financial information; money or a donation; or PIN codes or passwords.
Lecter is a serial killer who sometimes lives under an alias, so it's easy to imagine how these basic questions might present a challenge for him. While he's very smart and educated, that won't be a defense against being caught in a factual lie by somebody who is armed with the real information. It could be something as simple as him not knowing the phone number of the house he murdered his way into, or not knowing whether it is rented or owned. Can you imagine asking somebody if they own the house they are standing in, and them not knowing the answer?
It's also worth noting that the Census Bureau only sends agents to residences that don't fill out the paper form. Presumably Lecter did not fill it out, because he wants to keep a low profile.
If the census-taker detects some kind of glaring inconsistency between Lecter's story and their own records, I assume they will attempt to probe the details in order to iron out the wrinkles in their data. Lecter would rightly see that as a danger to his cover identity, and their questions as attempts to trap him in a lie -- to "test" him.
A stupid bean-counter who threatens to unmask Lecter by their dogged pursuit of unimportant factoids about cattle that he already slaughtered. I bet the fava beans was a deliberate jibe on Lecter's part. "Count these beans, Mr. Main Course!"