Test querying by JID.
Test name queries and limit clamping.