### Question:
WikiDataSystem extends SimpleSystemImpl { public SimpleNode cache(EntityIdValue entityId, boolean optional) { SimpleNode node = null; String purpose = entityId.getEntityType(); if (cacheMap.containsKey(purpose)) { Cache cache = cacheMap.get(purpose); String wikidata_id=entityId.getId(); GraphTraversal<Vertex, Vertex> propVertex = cache.getSystem().g().V() .has("wikidata_id", wikidata_id); if (propVertex.hasNext()) { node = SimpleNode.of(propVertex.next()); } else { if (!optional) { node = cache.getSystem().moveTo(entityId.getId()); if (debug) LOGGER.log(Level.INFO, String.format("caching %s=%s", entityId.getIri(), node.getMap().get("label_en"))); } } } return node; } WikiDataSystem();  WikiDataSystem(String... languageCodes); private  WikiDataSystem(WikibaseDataFetcher wbdf, String... languageCodes); @Override SimpleNode moveTo(String entityId, String... keys); @Override SimpleSystem connect(String... connectionParams); void addLanguage(String languageCode); List<String> getLanguages(); Cache useCache(File cacheFile, String purpose); SimpleNode cache(EntityIdValue entityId, boolean optional); static Optional<EntityIdValue> createEntityIdValue(String id); Optional<SimpleNode> cache(String id, boolean optional); @Override Class<? extends SimpleNode> getNodeClass(); static final String PURPOSE_PROPERTY; static final String PURPOSE_ITEM; static String siteiri; }### Answer:
@Test public void testPropertyCache() throws Exception { queenVictoria = getQueenVictoria(); queenVictoria.getVertex().properties().forEachRemaining(prop -> { Optional<SimpleNode> propNode = wikiDataSystem.cache(prop.label(), false); if (debug) { if (propNode.isPresent()) { System.out.println( String.format("%s (%s)=%s", propNode.get().getMap().get("label_en"), prop.label(), prop.value().toString())); } } }); wikiDataSystem.flushCache(WikiDataSystem.PURPOSE_PROPERTY); }