brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [30/35] incubator-brooklyn git commit: Renaming brooklyn.test.entity.*
Date Wed, 12 Aug 2015 15:55:48 GMT
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/NoopStartable.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/NoopStartable.java b/core/src/test/java/org/apache/brooklyn/test/entity/NoopStartable.java
new file mode 100644
index 0000000..f85a116
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/NoopStartable.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+import java.util.Collection;
+
+import brooklyn.entity.trait.Startable;
+
+public class NoopStartable implements Startable {
+   public void start(Collection loc) {}
+   public void stop() {}
+   public void restart() {}
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplication.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestApplication.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplication.java
new file mode 100644
index 0000000..afd2b5b
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplication.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+import java.util.Map;
+
+import org.apache.brooklyn.management.ManagementContext;
+
+import brooklyn.entity.Entity;
+import brooklyn.entity.basic.ApplicationBuilder;
+import brooklyn.entity.basic.EntityInternal;
+import brooklyn.entity.basic.StartableApplication;
+import brooklyn.entity.proxying.EntitySpec;
+import brooklyn.entity.proxying.ImplementedBy;
+import brooklyn.event.AttributeSensor;
+import brooklyn.event.basic.Sensors;
+import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
+import brooklyn.location.basic.SimulatedLocation;
+
+/**
+ * Mock application for testing.
+ */
+//TODO Don't want to extend EntityLocal/EntityInternal, but tests want to call things like app.setAttribute
+@ImplementedBy(TestApplicationImpl.class)
+public interface TestApplication extends StartableApplication, EntityInternal {
+
+    public static final AttributeSensor<String> MY_ATTRIBUTE = Sensors.newStringSensor("test.myattribute", "Test attribute sensor");
+
+    public <T extends Entity> T createAndManageChild(EntitySpec<T> spec);
+
+    public SimulatedLocation newSimulatedLocation();
+    public LocalhostMachineProvisioningLocation newLocalhostProvisioningLocation();
+    public LocalhostMachineProvisioningLocation newLocalhostProvisioningLocation(Map<?,?> flags);
+
+    public static class Factory {
+        public static TestApplication newManagedInstanceForTests(ManagementContext mgmt) {
+            return ApplicationBuilder.newManagedApp(TestApplication.class, mgmt);
+        }
+        public static TestApplication newManagedInstanceForTests() {
+            return newManagedInstanceForTests(new LocalManagementContextForTests());
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplicationImpl.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestApplicationImpl.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplicationImpl.java
new file mode 100644
index 0000000..65d2ac1
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplicationImpl.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+import java.util.Map;
+
+import org.apache.brooklyn.management.SubscriptionHandle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import brooklyn.entity.Entity;
+import brooklyn.entity.Group;
+import brooklyn.entity.basic.AbstractApplication;
+import brooklyn.entity.proxying.EntitySpec;
+import brooklyn.event.Sensor;
+import brooklyn.event.SensorEventListener;
+import brooklyn.location.LocationSpec;
+import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
+import brooklyn.location.basic.SimulatedLocation;
+import brooklyn.util.logging.LoggingSetup;
+
+/**
+ * Mock application for testing.
+ */
+public class TestApplicationImpl extends AbstractApplication implements TestApplication {
+    private static final Logger LOG = LoggerFactory.getLogger(TestApplication.class);
+
+    static {
+        // our tests should redirect the j.u.l logging messages to logback 
+        LoggingSetup.installJavaUtilLoggingBridge();
+    }
+
+    public TestApplicationImpl() {
+        super();
+    }
+
+    public TestApplicationImpl(Map<?,?> flags) {
+        super(flags);
+    }
+
+    @Override
+    public <T extends Entity> T createAndManageChild(EntitySpec<T> spec) {
+        if (!getManagementSupport().isDeployed()) throw new IllegalStateException("Entity "+this+" not managed");
+        T child = addChild(spec);
+        getEntityManager().manage(child);
+        return child;
+    }
+    
+    @Override
+    public <T> SubscriptionHandle subscribeToMembers(Group parent, Sensor<T> sensor, SensorEventListener<? super T> listener) {
+        return getSubscriptionContext().subscribeToMembers(parent, sensor, listener);
+    }
+
+    @Override
+    public String toString() {
+        String id = getId();
+        return "Application["+id.substring(Math.max(0, id.length()-8))+"]";
+    }
+
+    @Override
+    public SimulatedLocation newSimulatedLocation() {
+        return getManagementContext().getLocationManager().createLocation(LocationSpec.create(SimulatedLocation.class));
+    }
+
+    @Override
+    public LocalhostMachineProvisioningLocation newLocalhostProvisioningLocation() {
+        return (LocalhostMachineProvisioningLocation) getManagementContext().getLocationRegistry().resolve("localhost");
+    }
+    
+    @Override
+    public LocalhostMachineProvisioningLocation newLocalhostProvisioningLocation(Map<?,?> flags) {
+        return (LocalhostMachineProvisioningLocation) getManagementContext().getLocationManager().createLocation(
+            LocationSpec.create(LocalhostMachineProvisioningLocation.class).configure(flags));
+    }
+
+    @Override
+    protected void logApplicationLifecycle(String message) {
+        // for tests, log this at debug so we see test info more
+        LOG.debug(message+" application "+this);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplicationNoEnrichersImpl.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestApplicationNoEnrichersImpl.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplicationNoEnrichersImpl.java
new file mode 100644
index 0000000..b90c227
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestApplicationNoEnrichersImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+
+/**
+ * Mock application for testing.
+ */
+public class TestApplicationNoEnrichersImpl extends TestApplicationImpl {
+    
+    protected void initEnrichers() { /* none */ }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestCluster.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestCluster.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestCluster.java
new file mode 100644
index 0000000..3c21976
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestCluster.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+import brooklyn.entity.basic.EntityLocal;
+import brooklyn.entity.group.DynamicCluster;
+import brooklyn.entity.proxying.ImplementedBy;
+
+/**
+* Mock cluster entity for testing.
+*/
+@ImplementedBy(TestClusterImpl.class)
+public interface TestCluster extends DynamicCluster, EntityLocal {
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestClusterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestClusterImpl.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestClusterImpl.java
new file mode 100644
index 0000000..17e7245
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestClusterImpl.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+import brooklyn.entity.basic.QuorumCheck.QuorumChecks;
+import brooklyn.entity.group.DynamicClusterImpl;
+import brooklyn.entity.trait.Startable;
+
+/**
+* Mock cluster entity for testing.
+*/
+public class TestClusterImpl extends DynamicClusterImpl implements TestCluster {
+    private volatile int size;
+
+    public TestClusterImpl() {
+    }
+    
+    @Override
+    public void init() {
+        super.init();
+        size = getConfig(INITIAL_SIZE);
+        setAttribute(Startable.SERVICE_UP, true);
+    }
+    
+    @Override
+    protected void initEnrichers() {
+        // say this is up if it has no children 
+        setConfig(UP_QUORUM_CHECK, QuorumChecks.atLeastOneUnlessEmpty());
+        
+        super.initEnrichers();
+    }
+    
+    @Override
+    public Integer resize(Integer desiredSize) {
+        this.size = desiredSize;
+        return size;
+    }
+    
+    @Override
+    public void stop() {
+        size = 0;
+        super.stop();
+    }
+    
+    @Override
+    public Integer getCurrentSize() {
+        return size;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntity.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestEntity.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntity.java
new file mode 100644
index 0000000..ad6a160
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntity.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.testng.collections.Lists;
+import org.testng.internal.annotations.Sets;
+
+import com.google.common.reflect.TypeToken;
+
+import brooklyn.config.ConfigKey;
+import brooklyn.entity.Entity;
+import brooklyn.entity.annotation.Effector;
+import brooklyn.entity.annotation.EffectorParam;
+import brooklyn.entity.basic.Attributes;
+import brooklyn.entity.basic.ConfigKeys;
+import brooklyn.entity.basic.EntityInternal;
+import brooklyn.entity.basic.EntityLocal;
+import brooklyn.entity.basic.Lifecycle;
+import brooklyn.entity.basic.MethodEffector;
+import brooklyn.entity.proxying.EntitySpec;
+import brooklyn.entity.proxying.ImplementedBy;
+import brooklyn.entity.trait.Startable;
+import brooklyn.event.AttributeSensor;
+import brooklyn.event.basic.BasicConfigKey;
+import brooklyn.event.basic.BasicNotificationSensor;
+import brooklyn.event.basic.ListConfigKey;
+import brooklyn.event.basic.MapConfigKey;
+import brooklyn.event.basic.Sensors;
+import brooklyn.event.basic.SetConfigKey;
+import brooklyn.util.collections.MutableMap;
+import brooklyn.util.flags.SetFromFlag;
+
+/**
+ * Mock entity for testing.
+ */
+//FIXME Don't want to extend EntityLocal, but tests call things like entity.subscribe(); how to deal with that elegantly?
+@ImplementedBy(TestEntityImpl.class)
+public interface TestEntity extends Entity, Startable, EntityLocal, EntityInternal {
+
+    @SetFromFlag("confName")
+    public static final ConfigKey<String> CONF_NAME = ConfigKeys.newStringConfigKey("test.confName", "Configuration key, my name", "defaultval");
+    public static final BasicConfigKey<Map> CONF_MAP_PLAIN = new BasicConfigKey<Map>(Map.class, "test.confMapPlain", "Configuration key that's a plain map", MutableMap.of());
+    public static final BasicConfigKey<List> CONF_LIST_PLAIN = new BasicConfigKey<List>(List.class, "test.confListPlain", "Configuration key that's a plain list", Lists.newArrayList());
+    public static final BasicConfigKey<Set> CONF_SET_PLAIN = new BasicConfigKey<Set>(Set.class, "test.confSetPlain", "Configuration key that's a plain set", Sets.newHashSet());
+    public static final MapConfigKey<String> CONF_MAP_THING = new MapConfigKey<String>(String.class, "test.confMapThing", "Configuration key that's a map thing");
+    public static final MapConfigKey<Object> CONF_MAP_THING_OBJECT = new MapConfigKey<Object>(Object.class, "test.confMapThing.obj", "Configuration key that's a map thing with objects");
+    public static final ListConfigKey<String> CONF_LIST_THING = new ListConfigKey<String>(String.class, "test.confListThing", "Configuration key that's a list thing");
+    public static final ListConfigKey<Object> CONF_LIST_OBJ_THING = new ListConfigKey<Object>(Object.class, "test.confListObjThing", "Configuration key that's a list thing, of objects");
+    public static final SetConfigKey<String> CONF_SET_THING = new SetConfigKey<String>(String.class, "test.confSetThing", "Configuration key that's a set thing");
+    public static final SetConfigKey<Object> CONF_SET_OBJ_THING = new SetConfigKey<Object>(Object.class, "test.confSetObjThing", "Configuration key that's a set thing, of objects");
+    public static final BasicConfigKey<Object> CONF_OBJECT = new BasicConfigKey<Object>(Object.class, "test.confObject", "Configuration key that's an object");
+    public static final ConfigKey<EntitySpec<? extends Entity>> CHILD_SPEC = ConfigKeys.newConfigKey(new TypeToken<EntitySpec<? extends Entity>>() {}, "test.childSpec", "Spec to be used for creating children");
+    
+    public static final AttributeSensor<Integer> SEQUENCE = Sensors.newIntegerSensor("test.sequence", "Test Sequence");
+    public static final AttributeSensor<String> NAME = Sensors.newStringSensor("test.name", "Test name");
+    public static final BasicNotificationSensor<Integer> MY_NOTIF = new BasicNotificationSensor<Integer>(Integer.class, "test.myNotif", "Test notification");
+    
+    public static final AttributeSensor<Lifecycle> SERVICE_STATE_ACTUAL = Attributes.SERVICE_STATE_ACTUAL;
+    @Deprecated
+    public static final AttributeSensor<Lifecycle> SERVICE_STATE = Attributes.SERVICE_STATE_ACTUAL;
+    
+    public static final MethodEffector<Void> MY_EFFECTOR = new MethodEffector<Void>(TestEntity.class, "myEffector");
+    public static final MethodEffector<Object> IDENTITY_EFFECTOR = new MethodEffector<Object>(TestEntity.class, "identityEffector");
+    
+    public boolean isLegacyConstruction();
+    
+    @Effector(description="an example of a no-arg effector")
+    public void myEffector();
+    
+    @Effector(description="returns the arg passed in")
+    public Object identityEffector(@EffectorParam(name="arg", description="val to return") Object arg);
+    
+    public AtomicInteger getCounter();
+    
+    public int getCount();
+    
+    public Map<?,?> getConstructorProperties();
+
+    public Map<?,?> getConfigureProperties();
+
+    public int getSequenceValue();
+
+    public void setSequenceValue(int value);
+    
+    public <T extends Entity> T createChild(EntitySpec<T> spec);
+
+    public <T extends Entity> T createAndManageChild(EntitySpec<T> spec);
+    
+    public Entity createAndManageChildFromConfig();
+    
+    public List<String> getCallHistory();
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityImpl.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityImpl.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityImpl.java
new file mode 100644
index 0000000..19ab21c
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityImpl.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import brooklyn.entity.Entity;
+import brooklyn.entity.basic.AbstractEntity;
+import brooklyn.entity.basic.Lifecycle;
+import brooklyn.entity.basic.ServiceStateLogic;
+import brooklyn.entity.proxying.EntitySpec;
+import brooklyn.location.Location;
+import brooklyn.util.collections.MutableMap;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Mock entity for testing.
+ */
+public class TestEntityImpl extends AbstractEntity implements TestEntity {
+    private static final Logger LOG = LoggerFactory.getLogger(TestEntityImpl.class);
+
+    protected int sequenceValue = 0;
+    protected AtomicInteger counter = new AtomicInteger(0);
+    protected Map<?,?> constructorProperties;
+    protected Map<?,?> configureProperties;
+    protected List<String> callHistory = Collections.synchronizedList(Lists.<String>newArrayList());
+    
+    public TestEntityImpl() {
+        super();
+    }
+    public TestEntityImpl(Map properties) {
+        this(properties, null);
+    }
+    public TestEntityImpl(Entity parent) {
+        this(MutableMap.of(), parent);
+    }
+    public TestEntityImpl(Map properties, Entity parent) {
+        super(properties, parent);
+        this.constructorProperties = properties;
+    }
+    
+    public AbstractEntity configure(Map flags) {
+        this.configureProperties = flags;
+        return super.configure(flags);
+    }
+    
+    @Override // made public for testing
+    public boolean isLegacyConstruction() {
+        return super.isLegacyConstruction();
+    }
+    
+    @Override
+    public void myEffector() {
+        if (LOG.isTraceEnabled()) LOG.trace("In myEffector for {}", this);
+        callHistory.add("myEffector");
+    }
+    
+    @Override
+    public Object identityEffector(Object arg) {
+        if (LOG.isTraceEnabled()) LOG.trace("In identityEffector for {}", this);
+        callHistory.add("identityEffector");
+        return checkNotNull(arg, "arg");
+    }
+    
+    @Override
+    public AtomicInteger getCounter() {
+        return counter;
+    }
+    
+    @Override
+    public int getCount() {
+        return counter.get();
+    }
+
+    @Override
+    public Map<?,?> getConstructorProperties() {
+        return constructorProperties;
+    }
+    
+    @Override
+    public Map<?,?> getConfigureProperties() {
+        return configureProperties;
+    }
+    
+    @Override
+    public synchronized int getSequenceValue() {
+        return sequenceValue;
+    }
+
+    @Override
+    public synchronized void setSequenceValue(int value) {
+        sequenceValue = value;
+        setAttribute(SEQUENCE, value);
+    }
+
+    @Override
+    public void start(Collection<? extends Location> locs) {
+        LOG.trace("Starting {}", this);
+        callHistory.add("start");
+        ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
+        counter.incrementAndGet();
+        addLocations(locs);
+        setAttribute(SERVICE_UP, true);
+        ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);
+    }
+
+    @Override
+    public void stop() { 
+        LOG.trace("Stopping {}", this);
+        callHistory.add("stop");
+        ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPING);
+        counter.decrementAndGet();
+        setAttribute(SERVICE_UP, false);
+        ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPED);
+    }
+
+    @Override
+    public void restart() {
+        LOG.trace("Restarting {}", this);
+        callHistory.add("restart");
+    }
+    
+    /**
+     * TODO Rename to addChild
+     */
+    @Override
+    public <T extends Entity> T createChild(EntitySpec<T> spec) {
+        return addChild(spec);
+    }
+
+    @Override
+    public <T extends Entity> T createAndManageChild(EntitySpec<T> spec) {
+        if (!getManagementSupport().isDeployed()) throw new IllegalStateException("Entity "+this+" not managed");
+        T child = createChild(spec);
+        getEntityManager().manage(child);
+        return child;
+    }
+
+    @Override
+    public Entity createAndManageChildFromConfig() {
+        return createAndManageChild(checkNotNull(getConfig(CHILD_SPEC), "childSpec"));
+    }
+
+//    @Override
+//    public String toString() {
+//        String id = getId();
+//        return getEntityType().getSimpleName()+"["+id.substring(Math.max(0, id.length()-8))+"]";
+//    }
+
+    @Override
+    public List<String> getCallHistory() {
+        return callHistory;
+    }
+    
+    public static class TestEntityWithoutEnrichers extends TestEntityImpl {
+        @Override
+        protected void initEnrichers() {}
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityNoEnrichersImpl.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityNoEnrichersImpl.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityNoEnrichersImpl.java
new file mode 100644
index 0000000..8772b7c
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityNoEnrichersImpl.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+
+/**
+ * Mock entity for testing.
+ */
+public class TestEntityNoEnrichersImpl extends TestEntityImpl {
+
+    @Override
+    protected void initEnrichers() {
+        // no enrichers here, so we can test the explicit enrichers we set
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityTransientCopyImpl.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityTransientCopyImpl.java b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityTransientCopyImpl.java
new file mode 100644
index 0000000..9b545c7
--- /dev/null
+++ b/core/src/test/java/org/apache/brooklyn/test/entity/TestEntityTransientCopyImpl.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.brooklyn.test.entity;
+
+import brooklyn.entity.basic.EntityTransientCopyInternal;
+
+/**
+ * Entity to give compilation errors if {@link EntityTransientCopyInternal} methods are not aligned
+ * with Entity methods. (Everything in that interface should be on EntityInternal, and if not, we want to know!)
+ */
+public class TestEntityTransientCopyImpl extends TestEntityImpl implements EntityTransientCopyInternal {
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreCleaner.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreCleaner.java b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreCleaner.java
index b763e5f..dcce68a 100644
--- a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreCleaner.java
+++ b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreCleaner.java
@@ -20,6 +20,7 @@ package brooklyn.entity.rebind.persister.jclouds;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.jclouds.ContextBuilder;
 import org.jclouds.blobstore.BlobStoreContext;
 import org.jclouds.blobstore.domain.PageSet;
@@ -31,7 +32,6 @@ import brooklyn.config.BrooklynProperties;
 import brooklyn.location.basic.LocationConfigKeys;
 import brooklyn.location.cloud.CloudLocationConfig;
 import brooklyn.location.jclouds.JcloudsLocation;
-import brooklyn.test.entity.LocalManagementContextForTests;
 
 /** Utility for cleaning up after test leaks. Most should not leak of course, but if they do... */
 public class BlobStoreCleaner {

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreExpiryTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreExpiryTest.java b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreExpiryTest.java
index 1daf882..f1622b3 100644
--- a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreExpiryTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreExpiryTest.java
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.Map.Entry;
 
 import org.apache.brooklyn.management.ManagementContext;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.apache.http.client.HttpClient;
 import org.jclouds.blobstore.BlobStoreContext;
 import org.jclouds.blobstore.domain.PageSet;
@@ -47,7 +48,6 @@ import brooklyn.location.basic.LocationConfigKeys;
 import brooklyn.location.cloud.CloudLocationConfig;
 import brooklyn.location.jclouds.JcloudsLocation;
 import brooklyn.location.jclouds.JcloudsUtil;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.http.HttpTool;
 import brooklyn.util.http.HttpToolResponse;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreTest.java b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreTest.java
index 9055c22..ba75e8d 100644
--- a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/BlobStoreTest.java
@@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
 import java.io.IOException;
 
 import org.apache.brooklyn.management.ManagementContext;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.jclouds.blobstore.BlobStoreContext;
 import org.jclouds.blobstore.domain.Blob;
 import org.jclouds.blobstore.domain.PageSet;
@@ -39,7 +40,6 @@ import brooklyn.location.basic.LocationConfigKeys;
 import brooklyn.location.cloud.CloudLocationConfig;
 import brooklyn.location.jclouds.JcloudsLocation;
 import brooklyn.location.jclouds.JcloudsUtil;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.stream.Streams;
 import brooklyn.util.text.Identifiers;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/HighAvailabilityManagerJcloudsObjectStoreTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/HighAvailabilityManagerJcloudsObjectStoreTest.java b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/HighAvailabilityManagerJcloudsObjectStoreTest.java
index 7ab75d6..92b7a44 100644
--- a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/HighAvailabilityManagerJcloudsObjectStoreTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/HighAvailabilityManagerJcloudsObjectStoreTest.java
@@ -18,6 +18,7 @@
  */
 package brooklyn.entity.rebind.persister.jclouds;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -25,7 +26,6 @@ import brooklyn.config.BrooklynProperties;
 import brooklyn.entity.rebind.persister.PersistenceObjectStore;
 import brooklyn.management.ha.HighAvailabilityManagerTestFixture;
 import brooklyn.management.internal.ManagementContextInternal;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.text.Identifiers;
 
 @Test(groups={"Live", "Live-sanity"})

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsBlobStoreBasedObjectStoreTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsBlobStoreBasedObjectStoreTest.java b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsBlobStoreBasedObjectStoreTest.java
index acb5df7..647e514 100644
--- a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsBlobStoreBasedObjectStoreTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsBlobStoreBasedObjectStoreTest.java
@@ -21,6 +21,7 @@ package brooklyn.entity.rebind.persister.jclouds;
 
 import java.util.List;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
@@ -33,7 +34,6 @@ import brooklyn.entity.rebind.persister.BrooklynPersistenceUtils;
 import brooklyn.entity.rebind.persister.PersistenceObjectStore;
 import brooklyn.entity.rebind.persister.PersistenceObjectStore.StoreObjectAccessor;
 import brooklyn.management.internal.LocalManagementContext;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.collections.MutableList;
 import brooklyn.util.text.Identifiers;
 import brooklyn.util.time.Duration;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsExpect100ContinueTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsExpect100ContinueTest.java b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsExpect100ContinueTest.java
index 7f45188..33ff2fa 100644
--- a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsExpect100ContinueTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsExpect100ContinueTest.java
@@ -19,6 +19,7 @@
 package brooklyn.entity.rebind.persister.jclouds;
 
 import org.apache.brooklyn.management.ManagementContext;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.jclouds.blobstore.BlobStore;
 import org.jclouds.blobstore.BlobStoreContext;
 import org.jclouds.blobstore.domain.Blob;
@@ -31,7 +32,6 @@ import brooklyn.config.BrooklynProperties;
 import brooklyn.entity.basic.Entities;
 import brooklyn.location.jclouds.JcloudsLocation;
 import brooklyn.location.jclouds.JcloudsUtil;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.text.Identifiers;
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.Logger;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
index c13e93a..6669f8b 100644
--- a/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/entity/rebind/persister/jclouds/JcloudsObjectStoreAccessorWriterTest.java
@@ -21,6 +21,7 @@ package brooklyn.entity.rebind.persister.jclouds;
 import java.io.IOException;
 
 import org.apache.brooklyn.management.ha.HighAvailabilityMode;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -33,7 +34,6 @@ import brooklyn.entity.rebind.persister.PersistMode;
 import brooklyn.entity.rebind.persister.PersistenceObjectStore.StoreObjectAccessorWithLock;
 import brooklyn.entity.rebind.persister.PersistenceStoreObjectAccessorWriterTestFixture;
 import brooklyn.entity.rebind.persister.StoreObjectAccessorLocking;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.exceptions.Exceptions;
 import brooklyn.util.net.Urls;
 import brooklyn.util.text.Identifiers;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/location/jclouds/AbstractJcloudsLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/location/jclouds/AbstractJcloudsLiveTest.java b/locations/jclouds/src/test/java/brooklyn/location/jclouds/AbstractJcloudsLiveTest.java
index a95d5e1..d84ce5c 100644
--- a/locations/jclouds/src/test/java/brooklyn/location/jclouds/AbstractJcloudsLiveTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/location/jclouds/AbstractJcloudsLiveTest.java
@@ -25,6 +25,7 @@ import static org.testng.Assert.assertNotNull;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -34,7 +35,6 @@ import brooklyn.config.BrooklynProperties;
 import brooklyn.entity.basic.Entities;
 import brooklyn.location.basic.SshMachineLocation;
 import brooklyn.management.internal.LocalManagementContext;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.exceptions.CompoundRuntimeException;
 
 import com.google.common.collect.ImmutableList;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsByonLocationResolverTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsByonLocationResolverTest.java b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsByonLocationResolverTest.java
index 77b1e74..44af0c7 100644
--- a/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsByonLocationResolverTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsByonLocationResolverTest.java
@@ -22,6 +22,7 @@ import static org.testng.Assert.fail;
 
 import java.util.NoSuchElementException;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -29,7 +30,6 @@ import org.testng.annotations.Test;
 import brooklyn.entity.basic.Entities;
 import brooklyn.location.basic.FixedListMachineProvisioningLocation;
 import brooklyn.management.internal.LocalManagementContext;
-import brooklyn.test.entity.LocalManagementContextForTests;
 
 public class JcloudsByonLocationResolverTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationMetadataTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationMetadataTest.java b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationMetadataTest.java
index e5ebfab..4454045 100644
--- a/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationMetadataTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationMetadataTest.java
@@ -20,6 +20,7 @@ package brooklyn.location.jclouds;
 
 import static org.testng.Assert.assertEquals;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -29,7 +30,6 @@ import brooklyn.entity.basic.Entities;
 import brooklyn.location.Location;
 import brooklyn.location.basic.LocationConfigKeys;
 import brooklyn.management.internal.LocalManagementContext;
-import brooklyn.test.entity.LocalManagementContextForTests;
 
 import com.google.common.collect.ImmutableSet;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationResolverTest.java b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
index ec8e511..0dc2658 100644
--- a/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationResolverTest.java
@@ -25,6 +25,7 @@ import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
@@ -38,7 +39,6 @@ import brooklyn.event.basic.SetConfigKey;
 import brooklyn.location.basic.LocationInternal;
 import brooklyn.location.cloud.CloudLocationConfig;
 import brooklyn.management.internal.LocalManagementContext;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.collections.MutableSet;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationTest.java b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationTest.java
index 5676787..5821a07 100644
--- a/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/location/jclouds/JcloudsLocationTest.java
@@ -27,6 +27,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.annotation.Nullable;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.jclouds.scriptbuilder.domain.OsFamily;
 import org.jclouds.scriptbuilder.domain.StatementList;
 import org.mockito.Mockito;
@@ -57,7 +58,6 @@ import brooklyn.location.geo.HostGeoInfo;
 import brooklyn.location.jclouds.JcloudsLocation.UserCreation;
 import brooklyn.management.internal.LocalManagementContext;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.config.ConfigBag;
 import brooklyn.util.exceptions.Exceptions;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/location/jclouds/LiveTestEntity.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/location/jclouds/LiveTestEntity.java b/locations/jclouds/src/test/java/brooklyn/location/jclouds/LiveTestEntity.java
index 39e5f0d..71cab29 100644
--- a/locations/jclouds/src/test/java/brooklyn/location/jclouds/LiveTestEntity.java
+++ b/locations/jclouds/src/test/java/brooklyn/location/jclouds/LiveTestEntity.java
@@ -20,6 +20,8 @@ package brooklyn.location.jclouds;
 
 import java.util.Collection;
 
+import org.apache.brooklyn.test.entity.TestEntity;
+import org.apache.brooklyn.test.entity.TestEntityImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -29,8 +31,6 @@ import brooklyn.location.Location;
 import brooklyn.location.MachineProvisioningLocation;
 import brooklyn.location.NoMachinesAvailableException;
 import brooklyn.location.basic.LocationInternal;
-import brooklyn.test.entity.TestEntity;
-import brooklyn.test.entity.TestEntityImpl;
 
 import com.google.common.base.Predicates;
 import com.google.common.base.Throwables;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java b/locations/jclouds/src/test/java/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java
index da27ab2..fca50a6 100644
--- a/locations/jclouds/src/test/java/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/location/jclouds/RebindJcloudsLocationLiveTest.java
@@ -24,6 +24,7 @@ import static org.testng.Assert.assertTrue;
 
 import java.io.File;
 
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -34,7 +35,6 @@ import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.entity.rebind.RebindTestUtils;
 import brooklyn.location.OsDetails;
 import brooklyn.management.internal.LocalManagementContext;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.config.ConfigBag;
 
 import com.google.common.base.Predicates;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/policy/os/AdvertiseWinrmLoginPolicyTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/policy/os/AdvertiseWinrmLoginPolicyTest.java b/locations/jclouds/src/test/java/brooklyn/policy/os/AdvertiseWinrmLoginPolicyTest.java
index bb2e22f..2e834a7 100644
--- a/locations/jclouds/src/test/java/brooklyn/policy/os/AdvertiseWinrmLoginPolicyTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/policy/os/AdvertiseWinrmLoginPolicyTest.java
@@ -20,13 +20,13 @@ package brooklyn.policy.os;
 
 import org.apache.brooklyn.policy.PolicySpec;
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.testng.annotations.Test;
 
 import brooklyn.entity.BrooklynAppUnitTestSupport;
 import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.location.LocationSpec;
 import brooklyn.location.basic.WinRmMachineLocation;
-import brooklyn.test.entity.TestEntity;
 
 import com.google.common.collect.ImmutableList;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyLiveTest.java b/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyLiveTest.java
index f3e66c0..797723c 100644
--- a/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyLiveTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyLiveTest.java
@@ -26,6 +26,7 @@ import java.util.regex.Pattern;
 
 import org.apache.brooklyn.policy.PolicySpec;
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.Test;
@@ -38,7 +39,6 @@ import brooklyn.location.MachineProvisioningLocation;
 import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
 import brooklyn.location.basic.SshMachineLocation;
 import brooklyn.policy.os.CreateUserPolicy;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.internal.ssh.SshTool;
 import brooklyn.util.text.Identifiers;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyTest.java b/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyTest.java
index cdfc7be..e4a096f 100644
--- a/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyTest.java
+++ b/locations/jclouds/src/test/java/brooklyn/policy/os/CreateUserPolicyTest.java
@@ -28,6 +28,7 @@ import java.util.regex.Pattern;
 
 import org.apache.brooklyn.policy.PolicySpec;
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -39,7 +40,6 @@ import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.location.LocationSpec;
 import brooklyn.location.basic.SshMachineLocation;
 import brooklyn.policy.os.CreateUserPolicy;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.internal.ssh.SshTool;
 
 import com.google.common.collect.ImmutableList;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/enricher/HttpLatencyDetectorTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/enricher/HttpLatencyDetectorTest.java b/policy/src/test/java/brooklyn/enricher/HttpLatencyDetectorTest.java
index b62cf48..836f117 100644
--- a/policy/src/test/java/brooklyn/enricher/HttpLatencyDetectorTest.java
+++ b/policy/src/test/java/brooklyn/enricher/HttpLatencyDetectorTest.java
@@ -22,6 +22,8 @@ import java.net.URL;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -35,8 +37,6 @@ import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.event.AttributeSensor;
 import brooklyn.event.basic.Sensors;
 import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.http.BetterMockWebServer;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/enricher/RebindEnricherTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/enricher/RebindEnricherTest.java b/policy/src/test/java/brooklyn/enricher/RebindEnricherTest.java
index 762a9fd..7c4d183 100644
--- a/policy/src/test/java/brooklyn/enricher/RebindEnricherTest.java
+++ b/policy/src/test/java/brooklyn/enricher/RebindEnricherTest.java
@@ -24,6 +24,7 @@ import java.net.URL;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.Test;
 
@@ -32,7 +33,6 @@ import brooklyn.entity.rebind.RebindTestFixtureWithApp;
 import brooklyn.event.AttributeSensor;
 import brooklyn.event.basic.Sensors;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.http.BetterMockWebServer;
 import brooklyn.util.time.Duration;
 import brooklyn.util.time.Time;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/enricher/TimeFractionDeltaEnricherTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/enricher/TimeFractionDeltaEnricherTest.java b/policy/src/test/java/brooklyn/enricher/TimeFractionDeltaEnricherTest.java
index 49a64e6..4572385 100644
--- a/policy/src/test/java/brooklyn/enricher/TimeFractionDeltaEnricherTest.java
+++ b/policy/src/test/java/brooklyn/enricher/TimeFractionDeltaEnricherTest.java
@@ -23,6 +23,8 @@ import static org.testng.Assert.assertEquals;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.brooklyn.management.SubscriptionContext;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -35,8 +37,6 @@ import brooklyn.event.AttributeSensor;
 import brooklyn.event.Sensor;
 import brooklyn.event.basic.BasicSensorEvent;
 import brooklyn.event.basic.Sensors;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 
 public class TimeFractionDeltaEnricherTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/entity/brooklyn/BrooklynMetricsTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/entity/brooklyn/BrooklynMetricsTest.java b/policy/src/test/java/brooklyn/entity/brooklyn/BrooklynMetricsTest.java
index 1c12319..c500468 100644
--- a/policy/src/test/java/brooklyn/entity/brooklyn/BrooklynMetricsTest.java
+++ b/policy/src/test/java/brooklyn/entity/brooklyn/BrooklynMetricsTest.java
@@ -21,6 +21,11 @@ package brooklyn.entity.brooklyn;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestApplicationNoEnrichersImpl;
+import org.apache.brooklyn.test.entity.TestEntity;
+import org.apache.brooklyn.test.entity.TestEntityNoEnrichersImpl;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -34,11 +39,6 @@ import brooklyn.event.AttributeSensor;
 import brooklyn.event.SensorEventListener;
 import brooklyn.location.basic.SimulatedLocation;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.LocalManagementContextForTests;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestApplicationNoEnrichersImpl;
-import brooklyn.test.entity.TestEntity;
-import brooklyn.test.entity.TestEntityNoEnrichersImpl;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.time.Duration;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
index 0af8db5..5bbeb46 100644
--- a/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
+++ b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
@@ -25,6 +25,9 @@ import static org.testng.Assert.assertTrue;
 
 import java.util.List;
 
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestCluster;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -37,9 +40,6 @@ import brooklyn.event.SensorEventListener;
 import brooklyn.event.basic.BasicNotificationSensor;
 import brooklyn.event.basic.Sensors;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestCluster;
-import brooklyn.test.entity.TestEntity;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyRebindTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyRebindTest.java b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyRebindTest.java
index ba7d249..ab105c5 100644
--- a/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyRebindTest.java
+++ b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyRebindTest.java
@@ -24,6 +24,8 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -36,8 +38,6 @@ import brooklyn.event.basic.BasicNotificationSensor;
 import brooklyn.event.basic.Sensors;
 import brooklyn.location.LocationSpec;
 import brooklyn.location.basic.SimulatedLocation;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.time.Duration;
 
 import com.google.common.collect.ImmutableList;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyReconfigurationTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyReconfigurationTest.java b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyReconfigurationTest.java
index e801803..baa88e5 100644
--- a/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyReconfigurationTest.java
+++ b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyReconfigurationTest.java
@@ -20,6 +20,8 @@ package brooklyn.policy.autoscaling;
 
 import static brooklyn.policy.autoscaling.AutoScalerPolicyTest.currentSizeAsserter;
 
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestCluster;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -29,8 +31,6 @@ import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.event.AttributeSensor;
 import brooklyn.event.basic.Sensors;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestCluster;
 import brooklyn.util.time.Duration;
 
 import com.google.common.collect.ImmutableMap;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java
index 63c7611..d268620 100644
--- a/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java
+++ b/policy/src/test/java/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java
@@ -33,6 +33,8 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.brooklyn.policy.PolicySpec;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestCluster;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
@@ -46,8 +48,6 @@ import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.entity.trait.Resizable;
 import brooklyn.event.basic.BasicNotificationSensor;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestCluster;
 import brooklyn.util.collections.MutableList;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.time.Duration;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/autoscaling/LocallyResizableEntity.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/autoscaling/LocallyResizableEntity.java b/policy/src/test/java/brooklyn/policy/autoscaling/LocallyResizableEntity.java
index 05c6e5b..70307a0 100644
--- a/policy/src/test/java/brooklyn/policy/autoscaling/LocallyResizableEntity.java
+++ b/policy/src/test/java/brooklyn/policy/autoscaling/LocallyResizableEntity.java
@@ -20,11 +20,12 @@ package brooklyn.policy.autoscaling;
 
 import java.util.List;
 
+import org.apache.brooklyn.test.entity.TestCluster;
+
 import brooklyn.entity.Entity;
 import brooklyn.entity.basic.AbstractEntity;
 import brooklyn.entity.trait.Resizable;
 import brooklyn.entity.trait.Startable;
-import brooklyn.test.entity.TestCluster;
 
 import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java b/policy/src/test/java/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java
index 963ad47..e017e50 100644
--- a/policy/src/test/java/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java
+++ b/policy/src/test/java/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java
@@ -26,6 +26,8 @@ import java.util.Random;
 import java.util.Set;
 
 import org.apache.brooklyn.management.ManagementContext;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -47,8 +49,6 @@ import brooklyn.policy.loadbalancing.MockItemEntity;
 import brooklyn.policy.loadbalancing.MockItemEntityImpl;
 import brooklyn.policy.loadbalancing.Movable;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.LocalManagementContextForTests;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.time.Time;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/ha/ConnectionFailureDetectorTest.java b/policy/src/test/java/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
index 7747746..e1b030f 100644
--- a/policy/src/test/java/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
+++ b/policy/src/test/java/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
@@ -30,6 +30,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.brooklyn.management.ManagementContext;
 import org.apache.brooklyn.policy.PolicySpec;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -41,8 +43,6 @@ import brooklyn.event.SensorEvent;
 import brooklyn.event.SensorEventListener;
 import brooklyn.policy.ha.HASensors.FailureDescriptor;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.LocalManagementContextForTests;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.time.Duration;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/ha/HaPolicyRebindTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/ha/HaPolicyRebindTest.java b/policy/src/test/java/brooklyn/policy/ha/HaPolicyRebindTest.java
index 31a5bd0..e428863 100644
--- a/policy/src/test/java/brooklyn/policy/ha/HaPolicyRebindTest.java
+++ b/policy/src/test/java/brooklyn/policy/ha/HaPolicyRebindTest.java
@@ -27,6 +27,8 @@ import java.util.Set;
 
 import org.apache.brooklyn.policy.EnricherSpec;
 import org.apache.brooklyn.policy.PolicySpec;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -45,8 +47,6 @@ import brooklyn.location.LocationSpec;
 import brooklyn.location.basic.SimulatedLocation;
 import brooklyn.policy.ha.HASensors.FailureDescriptor;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.collections.MutableMap;
 
 import com.google.common.base.Predicate;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorStabilizationTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorStabilizationTest.java b/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorStabilizationTest.java
index 2a1c552..270fd87 100644
--- a/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorStabilizationTest.java
+++ b/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorStabilizationTest.java
@@ -26,6 +26,9 @@ import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.brooklyn.management.ManagementContext;
 import org.apache.brooklyn.policy.EnricherSpec;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -43,9 +46,6 @@ import brooklyn.event.SensorEvent;
 import brooklyn.event.SensorEventListener;
 import brooklyn.policy.ha.HASensors.FailureDescriptor;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.LocalManagementContextForTests;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.time.Duration;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorTest.java b/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorTest.java
index 3e41f9d..fa8d654 100644
--- a/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorTest.java
+++ b/policy/src/test/java/brooklyn/policy/ha/ServiceFailureDetectorTest.java
@@ -29,6 +29,9 @@ import java.util.concurrent.TimeUnit;
 import org.apache.brooklyn.management.ManagementContext;
 import org.apache.brooklyn.policy.EnricherSpec;
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -47,9 +50,6 @@ import brooklyn.event.SensorEvent;
 import brooklyn.event.SensorEventListener;
 import brooklyn.policy.ha.HASensors.FailureDescriptor;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.LocalManagementContextForTests;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.time.Duration;
 import brooklyn.util.time.Time;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/ha/ServiceReplacerTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/ha/ServiceReplacerTest.java b/policy/src/test/java/brooklyn/policy/ha/ServiceReplacerTest.java
index 57edf5f..944b267 100644
--- a/policy/src/test/java/brooklyn/policy/ha/ServiceReplacerTest.java
+++ b/policy/src/test/java/brooklyn/policy/ha/ServiceReplacerTest.java
@@ -30,6 +30,9 @@ import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.brooklyn.management.ManagementContext;
 import org.apache.brooklyn.policy.PolicySpec;
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
@@ -55,9 +58,6 @@ import brooklyn.location.LocationSpec;
 import brooklyn.location.basic.SimulatedLocation;
 import brooklyn.policy.ha.HASensors.FailureDescriptor;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.LocalManagementContextForTests;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.config.ConfigBag;
 import brooklyn.util.javalang.JavaClassNames;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/ha/ServiceRestarterTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/ha/ServiceRestarterTest.java b/policy/src/test/java/brooklyn/policy/ha/ServiceRestarterTest.java
index 8419066..745654d 100644
--- a/policy/src/test/java/brooklyn/policy/ha/ServiceRestarterTest.java
+++ b/policy/src/test/java/brooklyn/policy/ha/ServiceRestarterTest.java
@@ -28,6 +28,9 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.brooklyn.management.ManagementContext;
 import org.apache.brooklyn.policy.PolicySpec;
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -42,9 +45,6 @@ import brooklyn.event.SensorEvent;
 import brooklyn.event.SensorEventListener;
 import brooklyn.policy.ha.HASensors.FailureDescriptor;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.LocalManagementContextForTests;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 import brooklyn.util.config.ConfigBag;
 import brooklyn.util.exceptions.Exceptions;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java b/policy/src/test/java/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java
index 244d8fa..e304635 100644
--- a/policy/src/test/java/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java
+++ b/policy/src/test/java/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Random;
 import java.util.Set;
 
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -44,7 +45,6 @@ import brooklyn.event.basic.BasicConfigKey;
 import brooklyn.event.basic.Sensors;
 import brooklyn.location.basic.SimulatedLocation;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.time.Time;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/loadbalancing/BalanceableWorkerPoolTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/loadbalancing/BalanceableWorkerPoolTest.java b/policy/src/test/java/brooklyn/policy/loadbalancing/BalanceableWorkerPoolTest.java
index 2bbc960..aab292e 100644
--- a/policy/src/test/java/brooklyn/policy/loadbalancing/BalanceableWorkerPoolTest.java
+++ b/policy/src/test/java/brooklyn/policy/loadbalancing/BalanceableWorkerPoolTest.java
@@ -21,6 +21,7 @@ package brooklyn.policy.loadbalancing;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -37,7 +38,6 @@ import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.entity.proxying.ImplementedBy;
 import brooklyn.entity.trait.Resizable;
 import brooklyn.location.basic.SimulatedLocation;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.exceptions.Exceptions;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java b/policy/src/test/java/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java
index 5761fa4..173b158 100644
--- a/policy/src/test/java/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java
+++ b/policy/src/test/java/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java
@@ -20,6 +20,7 @@ package brooklyn.policy.loadbalancing;
 
 import static org.testng.Assert.assertEquals;
 
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -32,7 +33,6 @@ import brooklyn.entity.basic.Entities;
 import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.location.basic.SimulatedLocation;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.collections.MutableMap;
 
 import com.google.common.base.Predicate;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/policy/src/test/java/brooklyn/policy/loadbalancing/LoadBalancingPolicyConcurrencyTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/brooklyn/policy/loadbalancing/LoadBalancingPolicyConcurrencyTest.java b/policy/src/test/java/brooklyn/policy/loadbalancing/LoadBalancingPolicyConcurrencyTest.java
index 6de70c3..8b38a1c 100644
--- a/policy/src/test/java/brooklyn/policy/loadbalancing/LoadBalancingPolicyConcurrencyTest.java
+++ b/policy/src/test/java/brooklyn/policy/loadbalancing/LoadBalancingPolicyConcurrencyTest.java
@@ -29,6 +29,7 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
 
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.AfterMethod;
@@ -37,7 +38,6 @@ import org.testng.annotations.Test;
 
 import brooklyn.entity.basic.Entities;
 import brooklyn.entity.basic.EntityLocal;
-import brooklyn.test.entity.TestApplication;
 
 import com.google.common.collect.Lists;
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java b/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java
index daef751..85de4ab 100644
--- a/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java
+++ b/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java
@@ -20,6 +20,7 @@ package brooklyn.entity;
 
 import java.util.Map;
 
+import org.apache.brooklyn.test.entity.LocalManagementContextForTests;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -27,7 +28,6 @@ import brooklyn.config.BrooklynProperties;
 import brooklyn.location.Location;
 import brooklyn.location.jclouds.JcloudsLocation;
 import brooklyn.location.jclouds.JcloudsLocationConfig;
-import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.collections.MutableMap;
 
 import com.google.common.collect.ImmutableList;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/software/base/src/test/java/brooklyn/entity/AbstractGoogleComputeLiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/AbstractGoogleComputeLiveTest.java b/software/base/src/test/java/brooklyn/entity/AbstractGoogleComputeLiveTest.java
index feeba70..0956067 100644
--- a/software/base/src/test/java/brooklyn/entity/AbstractGoogleComputeLiveTest.java
+++ b/software/base/src/test/java/brooklyn/entity/AbstractGoogleComputeLiveTest.java
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.brooklyn.management.ManagementContext;
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -31,7 +32,6 @@ import brooklyn.entity.basic.ApplicationBuilder;
 import brooklyn.entity.basic.Entities;
 import brooklyn.location.Location;
 import brooklyn.management.internal.LocalManagementContext;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.collections.MutableMap;
 
 import com.google.common.base.CaseFormat;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/software/base/src/test/java/brooklyn/entity/AbstractSoftlayerLiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/AbstractSoftlayerLiveTest.java b/software/base/src/test/java/brooklyn/entity/AbstractSoftlayerLiveTest.java
index 232ce4f..54dc7fb 100644
--- a/software/base/src/test/java/brooklyn/entity/AbstractSoftlayerLiveTest.java
+++ b/software/base/src/test/java/brooklyn/entity/AbstractSoftlayerLiveTest.java
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.brooklyn.management.ManagementContext;
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -35,7 +36,6 @@ import brooklyn.entity.basic.ApplicationBuilder;
 import brooklyn.entity.basic.Entities;
 import brooklyn.location.Location;
 import brooklyn.management.internal.LocalManagementContext;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.text.StringShortener;
 import brooklyn.util.text.Strings;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/software/base/src/test/java/brooklyn/entity/basic/SameServerEntityTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/basic/SameServerEntityTest.java b/software/base/src/test/java/brooklyn/entity/basic/SameServerEntityTest.java
index 477a4cc..09f7027 100644
--- a/software/base/src/test/java/brooklyn/entity/basic/SameServerEntityTest.java
+++ b/software/base/src/test/java/brooklyn/entity/basic/SameServerEntityTest.java
@@ -23,6 +23,8 @@ import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
 
 import org.apache.brooklyn.management.ManagementContext;
+import org.apache.brooklyn.test.entity.TestApplication;
+import org.apache.brooklyn.test.entity.TestEntity;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -32,8 +34,6 @@ import brooklyn.entity.proxying.EntitySpec;
 import brooklyn.location.Location;
 import brooklyn.location.basic.LocalhostMachineProvisioningLocation;
 import brooklyn.location.basic.LocalhostMachineProvisioningLocation.LocalhostMachine;
-import brooklyn.test.entity.TestApplication;
-import brooklyn.test.entity.TestEntity;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityRebindTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityRebindTest.java b/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityRebindTest.java
index d9dbf67..fb75459 100644
--- a/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityRebindTest.java
+++ b/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityRebindTest.java
@@ -30,6 +30,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.brooklyn.management.ManagementContext;
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
@@ -44,7 +45,6 @@ import brooklyn.location.MachineProvisioningLocation;
 import brooklyn.location.NoMachinesAvailableException;
 import brooklyn.location.basic.AbstractLocation;
 import brooklyn.location.basic.SshMachineLocation;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.flags.SetFromFlag;
 
 import com.google.common.collect.ImmutableList;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d702c5b/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityTest.java b/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityTest.java
index fd78fa4..76b6b3d 100644
--- a/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityTest.java
+++ b/software/base/src/test/java/brooklyn/entity/basic/SoftwareProcessEntityTest.java
@@ -34,6 +34,7 @@ import org.apache.brooklyn.management.EntityManager;
 import org.apache.brooklyn.management.Task;
 import org.apache.brooklyn.management.TaskAdaptable;
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.test.entity.TestApplication;
 import org.jclouds.util.Throwables2;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -69,7 +70,6 @@ import brooklyn.location.basic.Locations;
 import brooklyn.location.basic.SimulatedLocation;
 import brooklyn.location.basic.SshMachineLocation;
 import brooklyn.test.Asserts;
-import brooklyn.test.entity.TestApplication;
 import brooklyn.util.collections.MutableMap;
 import brooklyn.util.config.ConfigBag;
 import brooklyn.util.exceptions.Exceptions;









Mime
View raw message