AccumuloAdapter { public static AccumuloConfiguration getAccumuloConfiguration(Criteria criteria, CognitionConfiguration cognition) { AccumuloConfiguration accumulo = cognition.getAccumuloConfiguration(); accumulo.setTableName(criteria.getAccumuloTable()); accumulo.setRanges(AccumuloUtils.getRanges(criteria.getDateStart(), criteria.getDateEnd(), criteria.getSchema().getSource())); accumulo.setAuthorizations(criteria.getSchema().getAuthorizations()); return accumulo; }  static AccumuloConfiguration getAccumuloConfiguration(Criteria criteria, CognitionConfiguration cognition);  }
@Test public void testGetAccumuloConfiguration() throws AccumuloSecurityException, IOException { Criteria criteria = new Criteria(); criteria.setDates(Instant.parse("2015-02-28T00:00:00.00Z"), Instant.parse("2015-02-28T23:59:59.99Z")); SchemaAdapter schema = new SchemaAdapter(); schema.loadJson("moreover-schema.json"); criteria.setSchema(schema); AccumuloConfiguration accumuloConfig = new AccumuloConfiguration(new MockInstance("test"), "root", "", true); CognitionConfiguration cognitionConfig = new CognitionConfiguration(accumuloConfig); AccumuloConfiguration newAccumoloConfig = AccumuloAdapter.getAccumuloConfiguration(criteria, cognitionConfig); assertNotNull(newAccumoloConfig); assertNotNull(newAccumoloConfig.getConfiguration()); assertNotNull(newAccumoloConfig.getJob()); assertEquals("moreover",criteria.getAccumuloTable()); }