protected void checkForValue(int value) {
    List<Integer> list = new ArrayList<Integer>();
    KieBase kieBase = (KieBase) container.getComponentInstance("KBase1");
    KieSession ksession = kieBase.newKieSession();

    ksession.setGlobal("list", list);
    ksession.fireAllRules();
    ksession.dispose();
    assertTrue("Expected:<" + value + "> but was:<" + list.get(0) + ">", list.get(0) == value);
  }
  @Test
  public void testBlueprintKieScanner() throws Exception {
    KieServices ks = KieServices.Factory.get();
    MavenRepository repository = createAndInstallModule(ks, FIRST_VALUE);

    container = createContainer();

    checkForValue(FIRST_VALUE);

    reinstallModule(repository, ks);

    KieScanner kscanner =
        (KieScanner) container.getComponentInstance("blueprint-scanner-releaseId#scanner");
    kscanner.scanNow();

    checkForValue(SECOND_VALUE);

    ks.getRepository().removeKieModule(releaseId);
  }