private UserListenerUtil userListenerUtil;
@Before
public void setup() throws Exception {
Visibility visibility = new Visibility("");
Authorizations authorizations = new InMemoryAuthorizations();
InMemoryGraphConfiguration config = new InMemoryGraphConfiguration(new HashMap());
idGenerator = new QueueIdGenerator();
graph = new InMemoryGraph(config, idGenerator, new DefaultSearchIndex(config.getConfig()));
authorizationRepository = new InMemoryAuthorizationRepository();
Configuration lumifyConfiguration = new HashMapConfigurationLoader(new HashMap()).createConfiguration();
LockRepository lockRepository = new LocalLockRepository(lumifyConfiguration);
InMemoryUserRepository userRepository = new InMemoryUserRepository(lumifyConfiguration, userListenerUtil);
user1 = (InMemoryUser) userRepository.addUser("user2", "user2", null, "none", new String[0]);
graph.addVertex(user1.getUserId(), visibility, authorizations);
user2 = (InMemoryUser) userRepository.addUser("user2", "user2", null, "none", new String[0]);
graph.addVertex(user2.getUserId(), visibility, authorizations);
ontologyRepository = new ReadOnlyInMemoryOntologyRepository();
ontologyRepository.init(lumifyConfiguration);
workspaceRepository = new SecureGraphWorkspaceRepository(ontologyRepository, graph, userRepository, authorizationRepository, workspaceDiff, lockRepository);
String entity1VertexId = "entity1Id";
entity1Vertex = graph.addVertex(entity1VertexId, new LumifyVisibility().getVisibility(), new InMemoryAuthorizations());
}