@Test public void ownerIsTheSoleMember() { Creature c = context.mock(Creature.class); PrivateMessageChannel ch = new PrivateMessageChannel(c); assertEquals(1, ch.getMembers().size()); assertSame(c, ch.getMembers().iterator().next()); assertTrue(ch.getMembers().contains(c)); }
@Test public void hasOwner() { Creature c = context.mock(Creature.class); PrivateMessageChannel ch = new PrivateMessageChannel(c); assertSame(c, ch.getOwner()); }