@Test
public void shouldStoreNodeTypeDefinitionsInSystemCatalog() {

    Collection<JcrNodeType> nodeTypes = repository.nodeTypeManager().getNodeTypes().getAllNodeTypes();
    for (int i = 0; i != 3; ++i) {
        system.store(nodeTypes, true);
        assertThat(repository.nodeTypeManager().refreshFromSystem(), is(true));
    }
}