### Question:
PersistedAtomManager extends AtomManager { @Override public GroundAtom getAtom(Predicate predicate, Constant... arguments) { GroundAtom atom = db.getAtom(predicate, arguments); if (!(atom instanceof RandomVariableAtom)) { return atom; } RandomVariableAtom rvAtom = (RandomVariableAtom)atom; if (!rvAtom.getPersisted()) { rvAtom.setAccessException(true); } if (enableAccessExceptions && (throwOnIllegalAccess || warnOnIllegalAccess) && rvAtom.getAccessException()) { reportAccessException(null, rvAtom); } return rvAtom; } PersistedAtomManager(Database db);  PersistedAtomManager(Database db, boolean prebuiltCache); @Override GroundAtom getAtom(Predicate predicate, Constant... arguments); void commitPersistedAtoms(); int getPersistedCount(); Iterable<RandomVariableAtom> getPersistedRVAtoms(); @Override void reportAccessException(RuntimeException ex, GroundAtom offendingAtom); static final String CONFIG_PREFIX; static final String THROW_ACCESS_EXCEPTION_KEY; static final boolean THROW_ACCESS_EXCEPTION_DEFAULT; }### Answer:
@Test public void baseTest() { TestModel.ModelInformation info = TestModel.getModel(); Set<StandardPredicate> toClose = new HashSet<StandardPredicate>(); Database database = info.dataStore.getDatabase(info.targetPartition, toClose, info.observationPartition); PersistedAtomManager atomManager = new PersistedAtomManager(database); GroundAtom atom = atomManager.getAtom(info.predicates.get("Friends"), new UniqueStringID("Alice"), new UniqueStringID("Bob")); assertTrue(atom instanceof RandomVariableAtom); assertEquals(atom.getValue(), 1.0, MathUtils.EPSILON); atom = atomManager.getAtom(info.predicates.get("Nice"), new UniqueStringID("Alice")); assertTrue(atom instanceof ObservedAtom); assertEquals(atom.getValue(), 0.9, MathUtils.EPSILON); database.close(); }