### Question:
JpaStorage implements Storage { @Override public ReferenceObservation getReferenceObservation(int id) { return (ReferenceObservation) persistenceManager.pick("select o from ReferenceObservation o where o.id = ?1", id); } JpaStorage(PersistenceManager persistenceManager); @Override DataFile getDatafile(int id); @Override final DataFile getDatafile(final String path); @Override DataFile getDatafileWithTransaction(String path); void store(DataFile dataFile); @Override int storeWithTransaction(DataFile dataFile); @Override Observation getObservation(int id); @Override RelatedObservation getRelatedObservation(int id); @Override ReferenceObservation getReferenceObservation(int id); @Override final Sensor getSensor(final String sensorName); @Override Sensor getSensorWithTransaction(String sensorName); @Override void storeWithTransaction(Sensor sensor); @Override List<RelatedObservation> getRelatedObservations(String sensorName, Date startDate, Date stopDate); @Override void store(InsituObservation insituObservation);  }### Answer:
@Test public void testGetReferenceObservation() { final String sql = "select o from ReferenceObservation o where o.id = ?1"; final int id = 2286; final String name = "refer_to_me"; final ReferenceObservation referenceObservation = new ReferenceObservation(); referenceObservation.setName(name); when(persistenceManager.pick(sql, id)).thenReturn(referenceObservation); final ReferenceObservation toolStorageReferenceObservation = jpaStorage.getReferenceObservation(id); assertNotNull(toolStorageReferenceObservation); assertEquals(name, toolStorageReferenceObservation.getName()); verify(persistenceManager, times(1)).pick(sql, id); verifyNoMoreInteractions(persistenceManager); }