@Test
public void testSetBean() {

    try {
        admin.set(Bean.create(BeanId.create("bogus", "bogus")));
    } catch (AbortRuntimeException e) {
        // don't know if schema or instances were invalid from
        // a HTTP 404 response, hence CFG090 and not CFG101/CDG304
        assertThat(e.getEvent().getCode(), is(CFG090));
    }
    Grandfather g1 = new Grandfather("g1");
    Bean bg1 = toBean(g1);
    admin.create(bg1);
    bg1.setProperty("prop1", "testSetBean");
    admin.set(bg1);
    Optional<Bean> optional = admin.get(bg1.getId());
    assertTrue(optional.isPresent());
    // assert new value
    String value = optional.get().getSingleValue("prop1");
    assertThat(value, is("testSetBean"));
    // assert that other values have been reset
    assertThat(optional.get().getSingleValue("prop9"), is("0"));
    assertNull(optional.get().getSingleValue("prop2"));
}