/*
 * Copyright 2013 by Cloudsoft Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package brooklyn.entity.network.bind;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import brooklyn.entity.basic.ApplicationBuilder;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.proxying.EntitySpecs;
import brooklyn.location.Location;
import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
import brooklyn.test.EntityTestUtils;
import brooklyn.test.entity.TestApplication;

public class BindDnsServerTest {

    @SuppressWarnings("unused")
    private static final Logger LOG = LoggerFactory.getLogger(BindDnsServerTest.class);

    protected TestApplication app;
    protected Location testLocation;
    protected BindDnsServer dns;

    @BeforeMethod(alwaysRun = true)
    public void setup() throws Exception {
        app = ApplicationBuilder.newManagedApp(TestApplication.class);
        testLocation = new LocalhostMachineProvisioningLocation();
    }

    @AfterMethod(alwaysRun = true)
    public void shutdown() {
        Entities.destroyAll(app.getManagementContext());
    }

    @Test(groups = { "Integration" })
    protected void testDnsEntity() throws Exception {
        BindDnsServer dns = app.createAndManageChild(EntitySpecs.spec(BindDnsServer.class));

        EntityTestUtils.assertAttributeEqualsEventually(dns, BindDnsServer.SERVICE_UP, true);
    }

}

@@ -811,16 +811,65 @@
 .Test;%0A%0A
+import com.google.common.collect.ImmutableList;%0A%0A
 import b
@@ -1790,24 +1790,116 @@
 ());%0A    %7D%0A%0A
+    // TODO this needs to be run on a slave VM where we can edit the resolver configuration%0A
     @Test(gr
@@ -1906,16 +1906,23 @@
 oups = %7B
+ %22WIP%22,
  %22Integr
@@ -2075,24 +2075,86 @@
 r.class));%0A%0A
+        app.start(ImmutableList.%3CLocation%3Eof(testLocation));%0A%0A
         Enti

Mark BindDnsServer integration test as WIP