* @param jid remote JID
* @throws IllegalStateException if there is already a result for this domain
*/
@VisibleForTesting
void testInjectInDomainToJidMap(String domain, String jid) {
FederationError error = null;
if (jid == null) {
error = FederationErrors.badRequest("Fake injected error");
}
Preconditions.checkState(
discoRequests.putIfAbsent(domain, new RemoteDisco(domain, jid, error)) == null);