final Long newNumRegions = 3L;
final String newCode = "new_code";
final Long newRenderSeq = 22L;
final boolean newUserSelectable = true;
JpaPageLayout pageLayout = new JpaPageLayout();
pageLayout.setNumberOfRegions(newNumRegions);
pageLayout.setCode(newCode);
pageLayout.setRenderSequence(newRenderSeq);
pageLayout.setUserSelectable(newUserSelectable);
assertThat(pageLayout.getEntityId(), is(nullValue()));
repository.save(pageLayout);
Long newId = pageLayout.getEntityId();
assertThat(newId > 0, is(true));
PageLayout newLayout = repository.get(newId.toString());
assertThat(newLayout.getCode(), is(newCode));
assertThat(newLayout.getRenderSequence(), is(newRenderSeq));
assertThat(newLayout.getNumberOfRegions(), is(newNumRegions));