public void testExecute() throws Exception {
    // Create a config channel and a server
    ConfigChannel channel = ConfigTestUtils.createConfigChannel(user.getOrg());
    Server server =
        ServerFactoryTest.createTestServer(
            user, true, ServerConstants.getServerGroupTypeProvisioningEntitled());
    // associate the two.
    server.subscribe(channel);
    SystemManager.storeServer(server);

    setRequestPathInfo("/systems/details/configuration/ConfigChannelList");
    addRequestParameter("sid", server.getId().toString());
    actionPerform();
    verifyPageList(ConfigChannelDto.class);
  }
  public void testDeployConfig() throws Exception {
    UserTestUtils.addUserRole(user, RoleFactory.ACTIVATION_KEY_ADMIN);

    // need a tools channel for config deploy
    Channel base = ChannelTestUtils.createBaseChannel(user);
    ChannelTestUtils.setupBaseChannelForVirtualization(user, base);

    ActivationKey key = createActivationKey();
    // Create a config channel
    ConfigChannel cc = ConfigTestUtils.createConfigChannel(user.getOrg());
    ConfigChannelListProcessor proc = new ConfigChannelListProcessor();
    proc.add(key.getConfigChannelsFor(user), cc);
    key.setDeployConfigs(true);
    ActivationKeyFactory.save(key);
    assertTrue(key.getDeployConfigs());
    assertFalse(key.getChannels().isEmpty());
    assertFalse(key.getPackages().isEmpty());
  }