JPASituationStore extends AbstractSituationStore implements SituationStore { public void updateResolutionState(final String situationId, final ResolutionState resolutionState) { _jpaStore.withJpa(new JpaWork<Void>() { public Void perform(Session s) { doUpdateResolutionState(loadSituation(s, situationId), resolutionState); 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 updateResolutionState() throws Exception { Situation situation = new Situation(); situation.setId("updateResolutionState"); situation.setTimestamp(System.currentTimeMillis()); persist(situation); Situation reload = _situationStore.getSituation(situation.getId()); assertFalse(reload.getSituationProperties().containsKey(SituationStore.RESOLUTION_STATE_PROPERTY)); _situationStore.updateResolutionState(situation.getId(),ResolutionState.IN_PROGRESS); reload = _situationStore.getSituation(situation.getId()); assertEquals(ResolutionState.IN_PROGRESS.name(), reload.getSituationProperties().get(SituationStore.RESOLUTION_STATE_PROPERTY)); }