### Question:
ScreenStack extends Stack { @Override public void act(float deltaTime) { Array<Action> actions = this.getActions(); Stage stage = getStage(); if (actions.size > 0) { if (stage != null) { if (stage.getActionsRequestRendering()) { Gdx.graphics.requestRendering(); } } for (int i = 0; i < actions.size; i++) { Action action = actions.get(i); if (action.act(deltaTime)) { actions.removeIndex(i); action.setActor(null); i--; } } } if (hasChildren()) { getChildren().peek().act(deltaTime); } }  void replace(Actor screen); void push(Actor screen); void pop(int n); @Override void act(float deltaTime);  }### Answer:
@Test @SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD") public void testActionsNoStage() throws Exception { Graphics real = Gdx.graphics; Gdx.graphics = spy(real); latch = new CountDownLatch(1); app.postRunnable(() -> { actor.remove(); actor.addAction(Actions.delay(1)); actor.act(1); latch.countDown(); }); assertThat(latch.await(5, TimeUnit.SECONDS)).isTrue(); Thread.sleep(200); verify(Gdx.graphics, times(1)).requestRendering(); Gdx.graphics = real; }