### Question:
JpaStorage implements Storage { public void store(DataFile dataFile) { persistenceManager.persist(dataFile); } 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 testStoreDataFile() { final String path = "/left/of/rome"; final DataFile dataFile = createDataFile(path); jpaStorage.store(dataFile); verify(persistenceManager, times(1)).persist(dataFile); verifyNoMoreInteractions(persistenceManager); }
@Test public void testStoreInsituObservation() { final InsituObservation insituObservation = new InsituObservation(); jpaStorage.store(insituObservation); verify(persistenceManager, times(1)).persist(insituObservation); verifyNoMoreInteractions(persistenceManager); }