@Test(expectedExceptions = IllegalStateException.class) public void testSetErasableFailsWhenDefaultCategoryAndErasable() { Category category = Category.defaultCategory("Test"); category.setErasable(true); // This should fail }
@Test public void testSetErasableSuceedsWhenDefaultCategoryAndNotErasable() { Category category = Category.defaultCategory("Test"); category.setErasable(false); // This should work assertFalse(category.isErasable()); }