UserImporter implements ProtectedPropertyImporter, ProtectedNodeImporter, UserConstants { @Override public void startChildInfo(@NotNull NodeInfo childInfo, @NotNull List<PropInfo> propInfos) { checkState(currentMembership != null); String ntName = childInfo.getPrimaryTypeName(); if (NT_REP_MEMBERS.equals(ntName)) { for (PropInfo prop : propInfos) { for (TextValue tv : prop.getTextValues()) { currentMembership.addMember(tv.getString()); } } } else if (NT_REP_MEMBER_REFERENCES.equals(ntName)) { for (PropInfo prop : propInfos) { if (REP_MEMBERS.equals(prop.getName())) { currentMembership.addMembers(prop.getTextValues()); } } } else { log.warn("{} is not of type " + NT_REP_MEMBERS + " or " + NT_REP_MEMBER_REFERENCES, childInfo.getName()); } } UserImporter(ConfigurationParameters config); @Override boolean init(@NotNull Session session, @NotNull Root root, @NotNull NamePathMapper namePathMapper,
            boolean isWorkspaceImport, int uuidBehavior,
            @NotNull ReferenceChangeTracker referenceTracker, @NotNull SecurityProvider securityProvider); @Override boolean handlePropInfo(@NotNull Tree parent, @NotNull PropInfo propInfo, @NotNull PropertyDefinition def); @Override void propertiesCompleted(@NotNull Tree protectedParent); @Override void processReferences(); @Override boolean start(@NotNull Tree protectedParent); @Override void startChildInfo(@NotNull NodeInfo childInfo, @NotNull List<PropInfo> propInfos); @Override void endChildInfo(); @Override void end(@NotNull Tree protectedParent);  }
@Test(expected = IllegalStateException.class) public void testStartChildInfoIllegalState() { importer.startChildInfo(createNodeInfo("memberRef", NT_REP_MEMBER_REFERENCES), ImmutableList.of(createPropInfo(REP_MEMBERS, "member1"))); }