Add more tests for the realm command