FederatedGraphStorage { public Collection<Graph> get(final User user, final List<String> graphIds) { if (null == user) { return Collections.emptyList(); } validateAllGivenGraphIdsAreVisibleForUser(user, graphIds); Stream<Graph> graphs = getStream(user, graphIds); if (null != graphIds) { graphs = graphs.sorted((g1, g2) -> graphIds.indexOf(g1.getGraphId()) - graphIds.indexOf(g2.getGraphId())); } final Set<Graph> rtn = graphs.collect(Collectors.toCollection(LinkedHashSet::new)); return Collections.unmodifiableCollection(rtn); }  void put(final Collection<GraphSerialisable> graphs, final FederatedAccess access); void put(final GraphSerialisable graph, final FederatedAccess access); Collection<String> getAllIds(final User user); Collection<String> getAllIds(final User user, final String adminAuth); Collection<Graph> getAll(final User user); boolean remove(final String graphId, final User user); Collection<Graph> get(final User user, final List<String> graphIds); Schema getSchema(final GetSchema operation, final Context context); Schema getSchema(final Map<String, String> config, final Context context); Schema getSchema(final Map<String, String> config, final User user); Set<StoreTrait> getTraits(final GetTraits op, final Context context); Set<StoreTrait> getTraits(final Map<String, String> config, final User user); void setGraphLibrary(final GraphLibrary graphLibrary); boolean changeGraphAccess(final String graphId, final FederatedAccess newFederatedAccess, final User requestingUser); boolean changeGraphAccess(final String graphId, final FederatedAccess newFederatedAccess, final User requestingUser, final String adminAuth); @Deprecated boolean changeGraphAccessAsAdmin(final String graphId, final FederatedAccess newFederatedAccess); boolean changeGraphId(final String graphId, final String newGraphId, final User requestingUser); boolean changeGraphId(final String graphId, final String newGraphId, final User requestingUser, final String adminAuth); @Deprecated boolean changeGraphIdAsAdmin(final String graphId, final String newGraphId); static final boolean DEFAULT_DISABLED_BY_DEFAULT; static final String ERROR_ADDING_GRAPH_TO_CACHE; static final String USER_IS_ATTEMPTING_TO_OVERWRITE; static final String ACCESS_IS_NULL; static final String GRAPH_IDS_NOT_VISIBLE; static final String UNABLE_TO_MERGE_THE_SCHEMAS_FOR_ALL_OF_YOUR_FEDERATED_GRAPHS; }
@Test public void shouldStartWithNoGraphs() throws Exception { final Collection<Graph> graphs = graphStorage.get(nullUser, null); assertEquals(0, graphs.size()); }