<CONTEXT>return runningProgramCountMatches(program, runId, expected);}</BUG>}, 10, TimeUnit.SECONDS, 50, TimeUnit.MILLISECONDS);}<extra_id_0>}, 10, TimeUnit.SECONDS, 50, TimeUnit.MILLISECONDS);}<BUG>private boolean runningProgramCountMatches(Id.Program program, String runId, int expectedCount) throws Exception {</BUG>String path = String.format("apps/%s/workflows/%s/%s/current", program.getApplicationId(), program.getId(), runId);HttpResponse response = doGet(getVersionedAPIPath(path, program.getNamespaceId()));if (response.getStatusLine().getStatusCode() == 200) {String json = EntityUtils.toString(response.getEntity());</CONTEXT>
private void verifyRunningProgramCount(final Id.Program program, final String runId, final int expected)Tasks.waitFor(expected, new Callable<Integer>() {@Overridepublic Integer call() throws Exception {return runningProgramCount(program, runId);private Integer runningProgramCount(Id.Program program, String runId) throws Exception {