TinkerGraphGraphConfiguration implements GraphConfiguration { public Graph configureGraphInstance(final GraphConfigurationContext context) throws GraphConfigurationException { final String graphFile = context.getProperties().getString(Tokens.REXSTER_GRAPH_LOCATION, null); boolean mockTx; try { mockTx = context.getProperties().getBoolean("graph-mock-tx", false); } catch (ConversionException ce) { throw new GraphConfigurationException(ce); } String fileType; try { fileType = context.getProperties().getString("graph-storage", ""); } catch (IllegalArgumentException iae) { fileType = ""; } try { if (graphFile == null || graphFile.length() == 0) { return mockTx ? new MockTinkerTransactionalGraph() : new TinkerGraph(); } else { return mockTx ? new MockTinkerTransactionalGraph(graphFile, getFileType(fileType)) : new TinkerGraph(graphFile, getFileType(fileType)); } } catch (Exception ex) { throw new GraphConfigurationException(ex); } }  Graph configureGraphInstance(final GraphConfigurationContext context);  }
@Test public void configureGraphInstanceNoFileConfig() throws GraphConfigurationException { Configuration graphConfig = new HierarchicalConfiguration(); Map<String, RexsterApplicationGraph> graphs = new HashMap<String, RexsterApplicationGraph>(); GraphConfigurationContext context = new GraphConfigurationContext(graphConfig, graphs); configuration.configureGraphInstance(context); }