private void populateActionDBMultipleStages(int numberOfStages,
      ActionDBAccessor db, String hostname, long requestId, long stageId)
      throws AmbariException {

    List<Stage> stages = new ArrayList<>();
    for (int i = 0; i < numberOfStages; i++) {
      Stage stage = createStubStage(hostname, requestId, stageId + i, false);
      stages.add(stage);
    }

    Request request = new Request(stages, "", clusters);
    db.persistActions(request);
  }
Tests that entities created int he {@link ActionDBAccessor} can be
retrieved with their IDs intact. EclipseLink seems to execute the
{@link NamedQuery} but then use its cached entities to fill in the data.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionDBAccessorImpl.java