### Question:
GeoGigDataStoreFactory implements DataStoreFactorySpi { @Override public GeoGigDataStore createNewDataStore(Map<String, Serializable> params) throws IOException { String defaultNamespace = (String) DEFAULT_NAMESPACE.lookUp(params); File repositoryRoot = new File((String) REPOSITORY.lookUp(params)); if (!repositoryRoot.isDirectory()) { if (repositoryRoot.exists()) { throw new IOException(repositoryRoot.getAbsolutePath() + " is not a directory"); } repositoryRoot.mkdirs(); } GeoGIG geogig = new GeoGIG(repositoryRoot); try { Repository repository = geogig.getOrCreateRepository(); Preconditions.checkState(repository != null); } catch (RuntimeException e) { throw new IOException(e); } GeoGigDataStore store = new GeoGigDataStore(geogig); if (defaultNamespace != null) { store.setNamespaceURI(defaultNamespace); } return store; }  @Override String getDisplayName(); @Override String getDescription(); @Override Param[] getParametersInfo(); @Override boolean canProcess(Map<String, Serializable> params); @Override boolean isAvailable(); @Override Map<Key, ?> getImplementationHints(); @Override GeoGigDataStore createDataStore(Map<String, Serializable> params); @Override GeoGigDataStore createNewDataStore(Map<String, Serializable> params); static final String DISPLAY_NAME; static final Param RESOLVER_CLASS_NAME; static final Param REPOSITORY; static final Param BRANCH; static final Param HEAD; static final Param DEFAULT_NAMESPACE; static final Param CREATE; }### Answer:
@Test public void testCreateNewDataStore() throws IOException { Map<String, Serializable> params; String newRepoDir = repositoryTempFolder.newFolder("datastore").getAbsolutePath(); params = ImmutableMap.of(REPOSITORY.key, (Serializable) newRepoDir); GeoGigDataStore store = factory.createNewDataStore(params); assertNotNull(store); }