SealableUtils { public static void checkSealed(Sealable sealable) { if (sealable.isSealed()) { throw new IllegalStateException("Unable to modify, instance " + sealable + " has been sealed"); } } private  SealableUtils(); static void checkSealed(Sealable sealable);  }
@Test(expectedExceptions = IllegalStateException.class) public void test_sealed() { SealableUtils.checkSealed(new MockSealed()); }