DataStore implements DataCacheProvider, RolesProvider { String rfcEllipticCurveName(final String curveName) { if (curveName == null) { return null; } String rfcCurveName; switch (curveName) { case "prime256v1": case "secp256r1": rfcCurveName = "P-256"; break; case "secp384r1": rfcCurveName = "P-384"; break; case "secp521r1": rfcCurveName = "P-521"; break; default: rfcCurveName = curveName; } return rfcCurveName; } DataStore(ChangeLogStore clogStore, CloudStore cloudStore); JWKList getZtsJWKList(Boolean rfc); void init(); boolean processDomain(SignedDomain signedDomain, boolean saveInStore); boolean processDomainDeletes(); void processDomainChecks(); boolean processDomainUpdates(); DomainData getDomainData(String name); void addDomainToCache(String name, DataCache dataCache); @Override DataCache getDataCache(String domainName); List<GroupMember> getGroupMembers(final String groupName); void getAccessibleRoles(DataCache data, String domainName, String identity,
            String[] requestedRoleList, Set<String> accessibleRoles, boolean keepFullName); String getPublicKey(String domain, String service, String keyId); HostServices getHostServices(String host); CloudStore getCloudStore(); void setCloudStore(CloudStore cloudStore); Cache<String, DataCache> getCacheStore(); Map<String, String> getPublicKeyCache(); @Override List<Role> getRolesByDomain(String domain);  }
@Test public void testRfcEllipticCurveName() { ChangeLogStore clogStore = new MockZMSFileChangeLogStore("/tmp/zts_server_unit_tests/zts_root", pkey, "0"); DataStore store = new DataStore(clogStore, null); assertNull(store.rfcEllipticCurveName(null)); assertEquals(store.rfcEllipticCurveName("prime256v1"), "P-256"); assertEquals(store.rfcEllipticCurveName("secp256r1"), "P-256"); assertEquals(store.rfcEllipticCurveName("secp384r1"), "P-384"); assertEquals(store.rfcEllipticCurveName("secp521r1"), "P-521"); assertEquals(store.rfcEllipticCurveName("prime192v1"), "prime192v1"); assertEquals(store.rfcEllipticCurveName("newcurve"), "newcurve"); }