@Test
@SuppressWarnings("unused")
public void test_immutable() {

    config.register(ImmutableConfig.class);
    Bean b = Bean.create(BeanId.create("1", "immutable"));
    b.setProperty("test", "something else");
    try {
        admin.set(b);
        fail("Should not be able to set immutable properties");
    } catch (AbortRuntimeException e) {
        assertThat(e.getEvent().getCode(), is(CFG306));
    }
    try {
        admin.create(b);
        fail("Should not be able to set immutable properties");
    } catch (AbortRuntimeException e) {
        assertThat(e.getEvent().getCode(), is(CFG306));
    }
    try {
        admin.merge(b);
        fail("Should not be able to set immutable properties");
    } catch (AbortRuntimeException e) {
        assertThat(e.getEvent().getCode(), is(CFG306));
    }
}