Add tests for incorrect domain_id checks.

Change-Id: I1aa838502a1c58ed2bc2154591351dbd242ec5b4