For example a single test class could want to have multiple realms, this would look something like:
@TestRealm
RealmResource realm; // supplier will set the realm name to default
@TestRealm(ref = "another")
RealmResource realm2;
@TestRealm(ref = "myother", config=MyOthertConfig.class)
RealmResource realm3; // supplier will set the realm name to myother
@TestRealm(config=MyOthertConfig.class)
RealmResource realm4; // this should fail as the registry shouldn't allow it
@TestUser
UserResource user1; // in realm
@TestUser(realm-ref="myother")
UserResource user; // realm3
The check for realm4 can be moved to a separate issue, and we can live with the current implementation where the registry would basically kill realm as it's not compatible with realm4.