JPASituationStore extends AbstractSituationStore implements SituationStore { @Override public void recordSuccessfulResubmit(final String situationId, final String userName) { _jpaStore.withJpa(new JpaWork<Void>() { public Void perform(Session s) { doRecordSuccessfulResubmit(loadSituation(s, situationId), userName); return null; } }); } JPASituationStore();  JPASituationStore(JpaStore jpaStore); @SuppressWarnings("unchecked") List<Situation> getSituations(final SituationsQuery sitQuery); void assignSituation(final String situationId, final String userName); void unassignSituation(final String situationId); void updateResolutionState(final String situationId, final ResolutionState resolutionState); @Override void recordSuccessfulResubmit(final String situationId, final String userName); @Override void recordResubmitFailure(final String situationId, final String errorMessage, final String userName);  }
@Test public void recordResubmit() throws Exception { Situation situation = new Situation(); situation.setId(name.getMethodName()); situation.setTimestamp(System.currentTimeMillis()); persist(situation); _situationStore.recordSuccessfulResubmit(situation.getId(), name.getMethodName()); Situation reload = _situationStore.getSituation(situation.getId()); assertEquals(name.getMethodName(), reload.getSituationProperties().get(SituationStore.RESUBMIT_BY_PROPERTY)); assertEquals(SituationStore.RESUBMIT_RESULT_SUCCESS, reload.getSituationProperties().get(SituationStore.RESUBMIT_RESULT_PROPERTY)); assertTrue(reload.getSituationProperties().containsKey(SituationStore.RESUBMIT_AT_PROPERTY)); assertFalse(reload.getSituationProperties().containsKey(SituationStore.RESUBMIT_ERROR_MESSAGE)); }