}
@Test
public void crudTypedB() {
// create
final CapabilityB created = capabilities().create(CapabilityB.class)
.withNotes("Some notes")
.withPropertyB1("foo")
.save();
assertThat(created.id(), is(notNullValue()));
assertThat(created.notes(), is("Some notes"));
assertThat(created.property("b1"), is("foo"));
assertThat(created.propertyB1(), is("foo"));
// read
final CapabilityB read = capabilities().get(CapabilityB.class, created.id());
assertThat(read.id(), is(created.id()));
assertThat(read.notes(), is(created.notes()));
assertThat(read.type(), is(created.type()));
assertThat(read.properties(), is(created.properties()));
assertThat(read.propertyB1(), is(created.propertyB1()));
// update
read.withNotes("Some other notes").save();
final CapabilityB updated = capabilities().get(CapabilityB.class, created.id());
assertThat(updated.notes(), is("Some other notes"));
assertThat(created.refresh().notes(), is("Some other notes"));
// delete
read.remove();