public boolean apply(RunningInstance instance) { logger.trace("looking for state on instance %s", instance); try { instance = refresh(instance); logger.trace("%s: looking for instance state %s: currently: %s", instance.getId(), InstanceState.RUNNING, instance .getInstanceState()); return instance.getInstanceState() == InstanceState.RUNNING; } catch (ResourceNotFoundException e) { return false; } }