SparkseeGraphConfiguration implements GraphConfiguration { public Graph configureGraphInstance(final GraphConfigurationContext context) throws GraphConfigurationException { final String graphFile = context.getProperties().getString(Tokens.REXSTER_GRAPH_LOCATION, null); if (graphFile == null || graphFile.length() == 0) { throw new GraphConfigurationException("Check graph configuration. Missing or empty configuration element: " + Tokens.REXSTER_GRAPH_LOCATION); } final HierarchicalConfiguration graphSectionConfig = (HierarchicalConfiguration) context.getProperties(); SubnodeConfiguration dexSpecificConfiguration; String sparkseeConfig; try { dexSpecificConfiguration = graphSectionConfig.configurationAt(Tokens.REXSTER_GRAPH_PROPERTIES); sparkseeConfig = dexSpecificConfiguration.getString(SPARKSEE_CONFIGURATION_PROPERTY, null); } catch (IllegalArgumentException iae) { sparkseeConfig = null; } try { return new SparkseeGraph(graphFile, sparkseeConfig); } catch (Exception ex) { throw new GraphConfigurationException(ex); } }  Graph configureGraphInstance(final GraphConfigurationContext context);  }
@Test(expected = GraphConfigurationException.class) public void configureGraphInstanceMissingGraphFileConfig() throws GraphConfigurationException { Configuration graphConfig = new HierarchicalConfiguration(); Map<String, RexsterApplicationGraph> graphs = new HashMap<String, RexsterApplicationGraph>(); GraphConfigurationContext context = new GraphConfigurationContext(graphConfig, graphs); configuration.configureGraphInstance(context); }