Assert.fail("expected iae");
} catch (IllegalArgumentException iae) {
// good
}
shardIdList.add(new ShardId(0));
BaseHasShardIdList bhsil = new MyBaseHasShardIdList(shardIdList);
ShardId anotherId = new ShardId(1);
shardIdList.add(anotherId);
// demonstrate that external changes to the list that was passed in
// aren't reflected inside the object
Assert.assertFalse(bhsil.getShardIds().contains(anotherId));
}