### Question:
Category extends DefaultEntityBase { public void setErasable(final boolean erasable) { if (erasable && this.defaultCategory) { throw new IllegalStateException("Default category cannot be made erasable"); } this.erasable = erasable; } protected  Category();  Category(final String name); @Override Integer getId(); void setId(final Integer id); @Required(value = NAME_REQUIRED) @Length(min = NAME_LENGTH_MIN, max = NAME_LENGTH_MAX) @LeadingOrTrailingWhitespace(allowed = NAME_LEADING_OR_TRAILING_WHITESPACES_ALLOWED) String getName(); void setName(final String name); @Required(value = DEFAULT_REQUIRED) boolean isDefaultCategory(); @Required(value = ERASABLE_REQUIRED) boolean isErasable(); void setErasable(final boolean erasable); @Required(value = ENTERPRISE_REQUIRED) Enterprise getEnterprise(); void setEnterprise(final Enterprise enterprise); static final String TABLE_NAME; final static String NAME_PROPERTY; final static String DEFAULT_PROPERTY; final static String ERASABLE_PROPERTY; final static String ENTERPRISE_PROPERTY; }### Answer:
@Test public void testSetErasable() { Category category = new Category("Test"); category.setErasable(true); assertTrue(category.isErasable()); category.setErasable(false); assertFalse(category.isErasable()); }