### Question:
ObjectStore implements Serializable, SnapshotEventListener, GraphManager { @Override public synchronized void registerNode(Object nodeId, Object nodeObject) { objectMap.put(nodeId, (Persistent) nodeObject); } ObjectStore(DataRowStore dataRowCache, Map<Object, Persistent> objectMap); int registeredObjectsCount(); DataRowStore getDataRowCache(); void setDataRowCache(DataRowStore dataRowCache); synchronized void objectsUnregistered(Collection objects); synchronized void objectsRolledBack(); void postprocessAfterCommit(GraphDiff parentChanges); DataRow getCachedSnapshot(ObjectId oid); synchronized DataRow getSnapshot(ObjectId oid); synchronized Iterator<Persistent> getObjectIterator(); synchronized boolean hasChanges(); synchronized List<Persistent> objectsInState(int state); @Override void snapshotsChanged(SnapshotEvent event); DataContext getContext(); void setContext(DataContext context); @Override synchronized Object getNode(Object nodeId); @Override synchronized Collection<Object> registeredNodes(); @Override synchronized void registerNode(Object nodeId, Object nodeObject); @Override synchronized Object unregisterNode(Object nodeId); @Override void nodeIdChanged(Object nodeId, Object newId); @Override void nodeCreated(Object nodeId); @Override void nodeRemoved(Object nodeId); @Override void nodePropertyChanged(
            Object nodeId,
            String property,
            Object oldValue,
            Object newValue); @Override void arcCreated(Object nodeId, Object targetNodeId, ArcId arcId); @Override void arcDeleted(Object nodeId, Object targetNodeId, ArcId arcId); ObjectId getFlattenedId(ObjectId objectId, String path); Collection<ObjectId> getFlattenedIds(ObjectId objectId); void markFlattenedPath(ObjectId objectId, String path, ObjectId id);  }### Answer:
@Test public void testRegisterNode() { ObjectId id = ObjectId.of("E1", "ID", 500); Persistent object = mock(Persistent.class); objectStore.registerNode(id, object); assertSame(object, objectStore.getNode(id)); }