geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [geode] 07/13: GEODE-5033: Use DistributedTestRule as non-static Rule
Date Mon, 23 Apr 2018 05:46:45 GMT
This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 46b8dde012cc619eac61ae8038eb61b9d37896e1
Author: Kirk Lund <klund@apache.org>
AuthorDate: Thu Apr 12 12:57:36 2018 -0700

    GEODE-5033: Use DistributedTestRule as non-static Rule
    
    * rename *DUnitTest to *DistributedTest
    * replace Host.getVM with VM.getVM
---
 .../dunit/internal/JUnit4DistributedTestCase.java  | 60 +----------------
 .../test/dunit/rules/DistributedTestRule.java      |  2 +-
 .../tests/CacheRuleBuilderDistributedTest.java     |  5 +-
 .../rules/tests/CacheRuleDistributedTest.java      |  5 +-
 ...utedRestoreSystemPropertiesDistributedTest.java | 39 +++++------
 .../DistributedRestoreSystemPropertiesTest.java    | 56 ----------------
 .../tests/DistributedTestRuleDistributedTest.java  |  9 +--
 .../tests/SharedCountersRuleDistributedTest.java   |  5 +-
 .../tests/SharedErrorCollectorDistributedTest.java | 12 +++-
 ...sicDUnitTest.java => BasicDistributedTest.java} | 76 ++++++++++++----------
 .../tests/GetCurrentVmNumDistributedTest.java      |  6 +-
 ...=> GetDefaultDiskStoreNameDistributedTest.java} | 13 ++--
 .../GetPidAndIdAfterBounceDistributedTest.java     |  6 +-
 .../dunit/tests/GetPidAndIdDistributedTest.java    |  6 +-
 ....java => GetTestMethodNameDistributedTest.java} | 12 ++--
 ...etPropertiesDisconnectsAllDistributedTest.java} | 16 +++--
 .../{VMDUnitTest.java => VMDistributedTest.java}   | 24 +++----
 17 files changed, 127 insertions(+), 225 deletions(-)

diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
index 4790e87..d174d9a 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -43,40 +43,20 @@ import org.junit.Rule;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.Region;
-import org.apache.geode.cache.query.QueryTestUtils;
-import org.apache.geode.cache.query.internal.QueryObserverHolder;
-import org.apache.geode.cache30.ClientServerTestCase;
-import org.apache.geode.cache30.GlobalLockingDUnitTest;
-import org.apache.geode.cache30.MultiVMRegionTestCase;
-import org.apache.geode.cache30.RegionTestCase;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.DistributionMessageObserver;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
-import org.apache.geode.distributed.internal.tcpserver.TcpClient;
 import org.apache.geode.internal.Version;
-import org.apache.geode.internal.admin.ClientStatsManager;
-import org.apache.geode.internal.cache.CacheServerLauncher;
-import org.apache.geode.internal.cache.DiskStoreObserver;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.HARegion;
-import org.apache.geode.internal.cache.InitialImageOperation;
 import org.apache.geode.internal.cache.PartitionedRegion;
-import org.apache.geode.internal.cache.tier.InternalClientMembership;
-import org.apache.geode.internal.cache.tier.sockets.CacheServerTestUtil;
-import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
-import org.apache.geode.internal.cache.tier.sockets.Message;
-import org.apache.geode.internal.cache.xmlcache.CacheCreation;
 import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.net.SocketCreator;
-import org.apache.geode.internal.net.SocketCreatorFactory;
-import org.apache.geode.management.internal.cli.LogWrapper;
-import org.apache.geode.pdx.internal.TypeRegistry;
 import org.apache.geode.test.dunit.DUnitBlackboard;
 import org.apache.geode.test.dunit.Disconnect;
 import org.apache.geode.test.dunit.Host;
-import org.apache.geode.test.dunit.IgnoredException;
 import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
+import org.apache.geode.test.dunit.rules.DistributedTestRule;
 import org.apache.geode.test.dunit.standalone.DUnitLauncher;
 import org.apache.geode.test.junit.rules.serializable.SerializableTestName;
 
@@ -584,43 +564,7 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
 
   private static final void tearDownVM() {
     closeCache();
-    disconnectFromDS();
-
-    // keep alphabetized to detect duplicate lines
-    CacheCreation.clearThreadLocals();
-    CacheServerLauncher.clearStatics();
-    CacheServerTestUtil.clearCacheReference();
-    ClientProxyMembershipID.system = null;
-    ClientServerTestCase.AUTO_LOAD_BALANCE = false;
-    ClientStatsManager.cleanupForTests();
-    DiskStoreObserver.setInstance(null);
-    unregisterInstantiatorsInThisVM();
-    DistributionMessageObserver.setInstance(null);
-    GlobalLockingDUnitTest.region_testBug32356 = null;
-    InitialImageOperation.slowImageProcessing = 0;
-    InternalClientMembership.unregisterAllListeners();
-    LogWrapper.close();
-    MultiVMRegionTestCase.CCRegion = null;
-    QueryObserverHolder.reset();
-    QueryTestUtils.setCache(null);
-    RegionTestCase.preSnapshotRegion = null;
-    SocketCreator.resetHostNameCache();
-    SocketCreator.resolve_dns = true;
-    TcpClient.clearStaticData();
-
-    // clear system properties -- keep alphabetized
-    System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "log-level");
-    System.clearProperty("jgroups.resolve_dns");
-    System.clearProperty(Message.MAX_MESSAGE_SIZE_PROPERTY);
-
-    if (InternalDistributedSystem.systemAttemptingReconnect != null) {
-      InternalDistributedSystem.systemAttemptingReconnect.stopReconnecting();
-    }
-
-    IgnoredException.removeAllExpectedExceptions();
-    SocketCreatorFactory.close();
-    TypeRegistry.setPdxSerializer(null);
-    TypeRegistry.init();
+    DistributedTestRule.TearDown.tearDownInVM();
     cleanDiskDirs();
   }
 
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/DistributedTestRule.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/DistributedTestRule.java
index 5dcb1e5..1b7394e 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/DistributedTestRule.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/DistributedTestRule.java
@@ -195,7 +195,7 @@ public class DistributedTestRule extends AbstractDistributedTestRule {
       DUnitLauncher.closeAndCheckForSuspects();
     }
 
-    private static void tearDownInVM() {
+    public static void tearDownInVM() {
       // 1. Please do NOT add to this list. I'm trying to DELETE this list.
       // 2. Instead, please add to the after() of your test or your rule.
 
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/CacheRuleBuilderDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/CacheRuleBuilderDistributedTest.java
index 72c3f11..b826eeb 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/CacheRuleBuilderDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/CacheRuleBuilderDistributedTest.java
@@ -24,7 +24,6 @@ import static org.assertj.core.api.Assertions.assertThat;
 import java.io.Serializable;
 import java.util.Properties;
 
-import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -39,8 +38,8 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 @SuppressWarnings("serial")
 public class CacheRuleBuilderDistributedTest {
 
-  @ClassRule
-  public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+  @Rule
+  public DistributedTestRule distributedTestRule = new DistributedTestRule();
 
   @Test
   public void defaultDoesNothing() throws Exception {
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/CacheRuleDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/CacheRuleDistributedTest.java
index a4748e5..41fbda9 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/CacheRuleDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/CacheRuleDistributedTest.java
@@ -24,7 +24,6 @@ import java.io.Serializable;
 import java.util.Properties;
 
 import org.junit.Before;
-import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -39,8 +38,8 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 @SuppressWarnings("serial")
 public class CacheRuleDistributedTest {
 
-  @ClassRule
-  public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+  @Rule
+  public DistributedTestRule distributedTestRule = new DistributedTestRule();
 
   @Test
   public void defaultDoesNothing() throws Exception {
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedRestoreSystemPropertiesDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedRestoreSystemPropertiesDistributedTest.java
index 5179644..3cb7238 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedRestoreSystemPropertiesDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedRestoreSystemPropertiesDistributedTest.java
@@ -14,7 +14,8 @@
  */
 package org.apache.geode.test.dunit.rules.tests;
 
-import static org.apache.geode.test.dunit.Host.getHost;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.apache.geode.test.dunit.VM.getVMCount;
 import static org.apache.geode.test.junit.runners.TestRunner.runTestWithValidation;
 import static org.assertj.core.api.Assertions.assertThat;
 
@@ -46,8 +47,8 @@ public class DistributedRestoreSystemPropertiesDistributedTest {
   public static void assertPreconditions() {
     assertThat(System.getProperty(NULL_PROPERTY)).isNull();
     assertThat(System.getProperty(PREEXISTING_PROPERTY)).isNull();
-    for (int i = 0; i < 4; i++) {
-      getHost(0).getVM(i).invoke(() -> {
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
         assertThat(System.getProperty(NULL_PROPERTY)).isNull();
         assertThat(System.getProperty(PREEXISTING_PROPERTY)).isNull();
       });
@@ -57,8 +58,8 @@ public class DistributedRestoreSystemPropertiesDistributedTest {
   @Before
   public void setUp() {
     System.setProperty(PREEXISTING_PROPERTY, PREEXISTING_VALUE);
-    for (int i = 0; i < 4; i++) {
-      getHost(0).getVM(i).invoke(() -> {
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
         System.setProperty(PREEXISTING_PROPERTY, PREEXISTING_VALUE);
       });
     }
@@ -67,8 +68,8 @@ public class DistributedRestoreSystemPropertiesDistributedTest {
   @After
   public void tearDown() {
     System.clearProperty(PREEXISTING_PROPERTY);
-    for (int i = 0; i < 4; i++) {
-      getHost(0).getVM(i).invoke(() -> {
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
         System.clearProperty(PREEXISTING_PROPERTY);
       });
     }
@@ -79,8 +80,8 @@ public class DistributedRestoreSystemPropertiesDistributedTest {
     runTestWithValidation(NullPropertyWithDifferentValues.class);
 
     assertThat(System.getProperty(NULL_PROPERTY)).isNull();
-    for (int i = 0; i < 4; i++) {
-      getHost(0).getVM(i).invoke(() -> {
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
         assertThat(System.getProperty(NULL_PROPERTY)).isNull();
       });
     }
@@ -91,8 +92,8 @@ public class DistributedRestoreSystemPropertiesDistributedTest {
     runTestWithValidation(NullPropertyWithDifferentValues.class);
 
     assertThat(System.getProperty(PREEXISTING_PROPERTY)).isEqualTo(PREEXISTING_VALUE);
-    for (int i = 0; i < 4; i++) {
-      getHost(0).getVM(i).invoke(() -> {
+    for (int i = 0; i < getVMCount(); i++) {
+      getVM(i).invoke(() -> {
         assertThat(System.getProperty(PREEXISTING_PROPERTY)).isEqualTo(PREEXISTING_VALUE);
       });
     }
@@ -110,10 +111,10 @@ public class DistributedRestoreSystemPropertiesDistributedTest {
     @Test
     public void nullPropertyWithDifferentValues() throws Exception {
       System.setProperty(NULL_PROPERTY, "controller");
-      getHost(0).getVM(0).invoke(() -> System.setProperty(NULL_PROPERTY, "vm0"));
-      getHost(0).getVM(1).invoke(() -> System.setProperty(NULL_PROPERTY, "vm1"));
-      getHost(0).getVM(2).invoke(() -> System.setProperty(NULL_PROPERTY, "vm2"));
-      getHost(0).getVM(3).invoke(() -> System.setProperty(NULL_PROPERTY, "vm3"));
+      getVM(0).invoke(() -> System.setProperty(NULL_PROPERTY, "vm0"));
+      getVM(1).invoke(() -> System.setProperty(NULL_PROPERTY, "vm1"));
+      getVM(2).invoke(() -> System.setProperty(NULL_PROPERTY, "vm2"));
+      getVM(3).invoke(() -> System.setProperty(NULL_PROPERTY, "vm3"));
     }
   }
 
@@ -129,10 +130,10 @@ public class DistributedRestoreSystemPropertiesDistributedTest {
     @Test
     public void preexistingPropertyWithDifferentValues() throws Exception {
       System.setProperty(PREEXISTING_PROPERTY, "controller");
-      getHost(0).getVM(0).invoke(() -> System.setProperty(PREEXISTING_PROPERTY, "vm0"));
-      getHost(0).getVM(1).invoke(() -> System.setProperty(PREEXISTING_PROPERTY, "vm1"));
-      getHost(0).getVM(2).invoke(() -> System.setProperty(PREEXISTING_PROPERTY, "vm2"));
-      getHost(0).getVM(3).invoke(() -> System.setProperty(PREEXISTING_PROPERTY, "vm3"));
+      getVM(0).invoke(() -> System.setProperty(PREEXISTING_PROPERTY, "vm0"));
+      getVM(1).invoke(() -> System.setProperty(PREEXISTING_PROPERTY, "vm1"));
+      getVM(2).invoke(() -> System.setProperty(PREEXISTING_PROPERTY, "vm2"));
+      getVM(3).invoke(() -> System.setProperty(PREEXISTING_PROPERTY, "vm3"));
     }
   }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedRestoreSystemPropertiesTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedRestoreSystemPropertiesTest.java
deleted file mode 100644
index 01793e9..0000000
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedRestoreSystemPropertiesTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.geode.test.dunit.rules.tests;
-
-import static org.apache.geode.test.junit.runners.TestRunner.runTestWithExpectedFailure;
-import static org.assertj.core.api.Assertions.assertThat;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.notification.Failure;
-
-import org.apache.geode.test.dunit.rules.DistributedRestoreSystemProperties;
-import org.apache.geode.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class DistributedRestoreSystemPropertiesTest {
-
-  @Test
-  public void withoutDUnitThrowsIllegalStateException() {
-    Failure failure = runTestWithExpectedFailure(WithoutDUnit.class);
-    assertThat(failure.getException()).isInstanceOf(IllegalStateException.class);
-    assertThat(failure.getMessage()).isEqualTo("DUnit VMs have not been launched");
-  }
-
-  @Test
-  public void isaRestoreSystemProperties() {
-    assertThat(new DistributedRestoreSystemProperties())
-        .isInstanceOf(RestoreSystemProperties.class);
-  }
-
-  public static class WithoutDUnit {
-
-    @Rule
-    public DistributedRestoreSystemProperties restoreSystemProperties =
-        new DistributedRestoreSystemProperties();
-
-    @Test
-    public void doTest() {
-      // nothing
-    }
-  }
-}
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedTestRuleDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedTestRuleDistributedTest.java
index 18ad269..0ad4c30 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedTestRuleDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/DistributedTestRuleDistributedTest.java
@@ -14,10 +14,11 @@
  */
 package org.apache.geode.test.dunit.rules.tests;
 
+import static org.apache.geode.test.dunit.VM.DEFAULT_VM_COUNT;
 import static org.apache.geode.test.dunit.VM.getVMCount;
 import static org.assertj.core.api.Assertions.assertThat;
 
-import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -27,11 +28,11 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 @Category(DistributedTest.class)
 public class DistributedTestRuleDistributedTest {
 
-  @ClassRule
-  public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+  @Rule
+  public DistributedTestRule distributedTestRule = new DistributedTestRule();
 
   @Test
   public void shouldHaveFourOrMoreDUnitVMsByDefault() throws Exception {
-    assertThat(getVMCount()).isGreaterThanOrEqualTo(4);
+    assertThat(getVMCount()).isGreaterThanOrEqualTo(DEFAULT_VM_COUNT);
   }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/SharedCountersRuleDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/SharedCountersRuleDistributedTest.java
index f8778e1..09263f5 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/SharedCountersRuleDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/SharedCountersRuleDistributedTest.java
@@ -29,7 +29,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
 import com.google.common.base.Stopwatch;
-import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -50,8 +49,8 @@ public class SharedCountersRuleDistributedTest implements Serializable {
   private static CompletableFuture<Void> combined;
   private static List<CompletableFuture<Boolean>> futures;
 
-  @ClassRule
-  public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+  @Rule
+  public DistributedTestRule distributedTestRule = new DistributedTestRule();
 
   @Rule
   public SharedCountersRule sharedCountersRule = SharedCountersRule.builder().build();
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/SharedErrorCollectorDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/SharedErrorCollectorDistributedTest.java
index 4f40724..4af8fa5 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/SharedErrorCollectorDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/rules/tests/SharedErrorCollectorDistributedTest.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.test.dunit.rules.tests;
 
+import static org.apache.geode.test.dunit.VM.DEFAULT_VM_COUNT;
 import static org.apache.geode.test.dunit.VM.getAllVMs;
 import static org.apache.geode.test.dunit.VM.getVM;
 import static org.apache.geode.test.dunit.VM.getVMCount;
@@ -24,7 +25,7 @@ import java.io.Serializable;
 import java.lang.reflect.Field;
 import java.util.List;
 
-import org.junit.ClassRule;
+import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -44,8 +45,13 @@ public class SharedErrorCollectorDistributedTest {
 
   static final String MESSAGE = "Failure message";
 
-  @ClassRule
-  public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+  @Rule
+  public DistributedTestRule distributedTestRule = new DistributedTestRule();
+
+  @Before
+  public void setUp() {
+    assertThat(getVMCount()).isGreaterThanOrEqualTo(DEFAULT_VM_COUNT);
+  }
 
   @Test
   public void errorCollectorHasExpectedField() throws Exception {
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/BasicDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/BasicDistributedTest.java
similarity index 70%
rename from geode-core/src/test/java/org/apache/geode/test/dunit/tests/BasicDUnitTest.java
rename to geode-core/src/test/java/org/apache/geode/test/dunit/tests/BasicDistributedTest.java
index 2364340..17c2c10 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/BasicDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/BasicDistributedTest.java
@@ -14,11 +14,18 @@
  */
 package org.apache.geode.test.dunit.tests;
 
-import static com.googlecode.catchexception.CatchException.*;
-import static com.googlecode.catchexception.throwable.CatchThrowable.*;
-import static org.apache.geode.test.dunit.Invoke.*;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
+import static com.googlecode.catchexception.CatchException.catchException;
+import static com.googlecode.catchexception.CatchException.caughtException;
+import static com.googlecode.catchexception.throwable.CatchThrowable.catchThrowable;
+import static com.googlecode.catchexception.throwable.CatchThrowable.caughtThrowable;
+import static org.apache.geode.test.dunit.Invoke.invokeInEveryVM;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.hamcrest.Matchers.nullValue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
 
 import java.util.Properties;
 
@@ -37,8 +44,8 @@ import org.apache.geode.test.junit.categories.DistributedTest;
  * This class tests the basic functionality of the distributed unit test framework.
  */
 @Category(DistributedTest.class)
-@SuppressWarnings({"serial", "unused"})
-public class BasicDUnitTest extends DistributedTestCase {
+@SuppressWarnings("serial")
+public class BasicDistributedTest extends DistributedTestCase {
 
   private static final String MESSAGE_FOR_remoteThrowException = "Test exception.  Please
ignore.";
 
@@ -47,16 +54,12 @@ public class BasicDUnitTest extends DistributedTestCase {
   private VM vm0;
   private VM vm1;
 
-  public BasicDUnitTest() {
-    super();
-  }
-
   @Override
   public final void postSetUp() throws Exception {
     bindings = new Properties();
     invokeInEveryVM(() -> bindings = new Properties());
-    this.vm0 = Host.getHost(0).getVM(0);
-    this.vm1 = Host.getHost(0).getVM(1);
+    vm0 = Host.getHost(0).getVM(0);
+    vm1 = Host.getHost(0).getVM(1);
   }
 
   @Override
@@ -74,55 +77,55 @@ public class BasicDUnitTest extends DistributedTestCase {
 
   @Test
   public void testInvokeOnClassTargetWithEmptyArgs() throws Exception {
-    assertThat(this.vm0.invoke(BasicDUnitTest.class, "booleanValue", new Object[] {}), is(true));
+    assertThat(vm0.invoke(BasicDistributedTest.class, "booleanValue", new Object[] {}), is(true));
   }
 
   @Test
   public void testInvokeOnObjectTargetWithEmptyArgs() throws Exception {
-    assertThat(this.vm0.invoke(new BasicDUnitTest(), "booleanValue", new Object[] {}), is(true));
+    assertThat(vm0.invoke(new BasicDistributedTest(), "booleanValue", new Object[] {}), is(true));
   }
 
   @Test
   public void testInvokeAsyncOnClassTargetWithEmptyArgs() throws Exception {
     AsyncInvocation<?> async =
-        this.vm0.invokeAsync(BasicDUnitTest.class, "booleanValue", new Object[] {}).join();
+        vm0.invokeAsync(BasicDistributedTest.class, "booleanValue", new Object[] {}).join();
     assertThat(async.getResult(), is(true));
   }
 
   @Test
   public void testInvokeAsyncOnObjectTargetWithEmptyArgs() throws Exception {
     AsyncInvocation<?> async =
-        this.vm0.invokeAsync(new BasicDUnitTest(), "booleanValue", new Object[] {}).join();
+        vm0.invokeAsync(new BasicDistributedTest(), "booleanValue", new Object[] {}).join();
     assertThat(async.getResult(), is(true));
   }
 
   @Test
   public void testInvokeOnClassTargetWithNullArgs() throws Exception {
-    assertThat(this.vm0.invoke(BasicDUnitTest.class, "booleanValue", null), is(true));
+    assertThat(vm0.invoke(BasicDistributedTest.class, "booleanValue", null), is(true));
   }
 
   @Test
   public void testInvokeOnObjectTargetWithNullArgs() throws Exception {
-    assertThat(this.vm0.invoke(new BasicDUnitTest(), "booleanValue", null), is(true));
+    assertThat(vm0.invoke(new BasicDistributedTest(), "booleanValue", null), is(true));
   }
 
   @Test
   public void testInvokeAsyncOnClassTargetWithNullArgs() throws Exception {
     AsyncInvocation<?> async =
-        this.vm0.invokeAsync(BasicDUnitTest.class, "booleanValue", null).join();
+        vm0.invokeAsync(BasicDistributedTest.class, "booleanValue", null).join();
     assertThat(async.getResult(), is(true));
   }
 
   @Test
   public void testInvokeAsyncOnObjectTargetWithNullArgs() throws Exception {
     AsyncInvocation<?> async =
-        this.vm0.invokeAsync(new BasicDUnitTest(), "booleanValue", null).join();
+        vm0.invokeAsync(new BasicDistributedTest(), "booleanValue", null).join();
     assertThat(async.getResult(), is(true));
   }
 
   @Test
   public void testRemoteInvocationWithException() throws Exception {
-    catchException(this.vm0).invoke(() -> remoteThrowException());
+    catchException(vm0).invoke(() -> remoteThrowException());
 
     assertThat(caughtException(), instanceOf(RMIException.class));
     assertThat(caughtException().getCause(), notNullValue());
@@ -132,24 +135,24 @@ public class BasicDUnitTest extends DistributedTestCase {
 
   @Test
   public void testInvokeWithLambda() throws Exception {
-    assertThat(this.vm0.invoke(() -> DUnitEnv.get().getVMID()), is(0));
-    assertThat(this.vm1.invoke(() -> DUnitEnv.get().getVMID()), is(1));
+    assertThat(vm0.invoke(() -> DUnitEnv.get().getVMID()), is(0));
+    assertThat(vm1.invoke(() -> DUnitEnv.get().getVMID()), is(1));
   }
 
   @Test
   public void testInvokeLambdaAsync() throws Throwable {
-    assertThat(this.vm0.invokeAsync(() -> DUnitEnv.get().getVMID()).getResult(), is(0));
+    assertThat(vm0.invokeAsync(() -> DUnitEnv.get().getVMID()).getResult(), is(0));
   }
 
   @Test
   public void testInvokeWithNamedLambda() {
-    assertThat(this.vm0.invoke("getVMID", () -> DUnitEnv.get().getVMID()), is(0));
-    assertThat(this.vm1.invoke("getVMID", () -> DUnitEnv.get().getVMID()), is(1));
+    assertThat(vm0.invoke("getVMID", () -> DUnitEnv.get().getVMID()), is(0));
+    assertThat(vm1.invoke("getVMID", () -> DUnitEnv.get().getVMID()), is(1));
   }
 
   @Test
   public void testInvokeNamedLambdaAsync() throws Throwable {
-    assertThat(this.vm0.invokeAsync("getVMID", () -> DUnitEnv.get().getVMID()).getResult(),
is(0));
+    assertThat(vm0.invokeAsync("getVMID", () -> DUnitEnv.get().getVMID()).getResult(),
is(0));
   }
 
   @Test
@@ -157,13 +160,13 @@ public class BasicDUnitTest extends DistributedTestCase {
     String name = getUniqueName();
     String value = "Hello";
 
-    this.vm0.invokeAsync(() -> remoteBind(name, value)).join().checkException();
-    this.vm0.invokeAsync(() -> remoteValidateBind(name, value)).join().checkException();
+    vm0.invokeAsync(() -> remoteBind(name, value)).join().checkException();
+    vm0.invokeAsync(() -> remoteValidateBind(name, value)).join().checkException();
   }
 
   @Test
   public void testRemoteInvokeAsyncWithException() throws Exception {
-    AsyncInvocation<?> async = this.vm0.invokeAsync(() -> remoteThrowException()).join();
+    AsyncInvocation<?> async = vm0.invokeAsync(() -> remoteThrowException()).join();
 
     assertThat(async.exceptionOccurred(), is(true));
     assertThat(async.getException(), instanceOf(BasicTestException.class));
@@ -178,7 +181,7 @@ public class BasicDUnitTest extends DistributedTestCase {
 
   @Test
   public void testInvokeNamedRunnableLambdaAsync() throws Exception {
-    catchThrowable(this.vm0.invokeAsync("throwSomething", () -> throwException()).join())
+    catchThrowable(vm0.invokeAsync("throwSomething", () -> throwException()).join())
         .checkException();
 
     assertThat(caughtThrowable(), notNullValue());
@@ -188,7 +191,7 @@ public class BasicDUnitTest extends DistributedTestCase {
 
   @Test
   public void testInvokeNamedRunnableLambda() throws Exception {
-    catchException(this.vm0).invoke("throwSomething", () -> throwException());
+    catchException(vm0).invoke("throwSomething", () -> throwException());
 
     assertThat(caughtException(), notNullValue());
     assertThat(caughtException().getCause(), notNullValue());
@@ -217,7 +220,7 @@ public class BasicDUnitTest extends DistributedTestCase {
     assertNotNull("value must not be null", value);
     assertNotNull("bindings must not be null", bindings);
 
-    new BasicDUnitTest().getSystem(); // forces connection
+    new BasicDistributedTest().getSystem(); // forces connection
     bindings.setProperty(name, value);
   }
 
@@ -225,6 +228,7 @@ public class BasicDUnitTest extends DistributedTestCase {
     assertEquals(expected, bindings.getProperty(name));
   }
 
+  @SuppressWarnings("unused")
   private static class BasicTestException extends RuntimeException {
     BasicTestException() {
       this("Test exception.  Please ignore.");
@@ -236,6 +240,8 @@ public class BasicDUnitTest extends DistributedTestCase {
   }
 
   private static class BasicDUnitException extends RuntimeException {
-    public BasicDUnitException() {}
+    BasicDUnitException() {
+      // nothing
+    }
   }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetCurrentVmNumDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetCurrentVmNumDistributedTest.java
index 689ed37..3515c00 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetCurrentVmNumDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetCurrentVmNumDistributedTest.java
@@ -21,7 +21,7 @@ import static org.apache.geode.test.dunit.VM.getVM;
 import static org.apache.geode.test.dunit.VM.getVMCount;
 import static org.assertj.core.api.Assertions.assertThat;
 
-import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -31,8 +31,8 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 @Category(DistributedTest.class)
 public class GetCurrentVmNumDistributedTest {
 
-  @ClassRule
-  public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+  @Rule
+  public DistributedTestRule distributedTestRule = new DistributedTestRule();
 
   @Test
   public void returnsNegativeOneInController() {
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetDefaultDiskStoreNameDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetDefaultDiskStoreNameDistributedTest.java
similarity index 83%
rename from geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetDefaultDiskStoreNameDUnitTest.java
rename to geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetDefaultDiskStoreNameDistributedTest.java
index 6c271f0..d0ddc4a 100755
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetDefaultDiskStoreNameDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetDefaultDiskStoreNameDistributedTest.java
@@ -14,19 +14,20 @@
  */
 package org.apache.geode.test.dunit.tests;
 
-import static org.assertj.core.api.Assertions.*;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.apache.geode.test.dunit.VM.getVMCount;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.test.dunit.DistributedTestCase;
-import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
 @Category(DistributedTest.class)
 @SuppressWarnings("serial")
-public class GetDefaultDiskStoreNameDUnitTest extends DistributedTestCase {
+public class GetDefaultDiskStoreNameDistributedTest extends DistributedTestCase {
 
   @Test
   public void testGetTestMethodName() {
@@ -45,9 +46,9 @@ public class GetDefaultDiskStoreNameDUnitTest extends DistributedTestCase
{
     String expected = createDefaultDiskStoreName(0, -1, "testGetTestMethodNameInAllVMs");
     assertGetDefaultDiskStoreName(expected);
 
-    for (int vmIndex = 0; vmIndex < Host.getHost(0).getVMCount(); vmIndex++) {
+    for (int vmIndex = 0; vmIndex < getVMCount(); vmIndex++) {
       String expectedInVM = createDefaultDiskStoreName(0, vmIndex, "testGetTestMethodNameInAllVMs");
-      Host.getHost(0).getVM(vmIndex).invoke(() -> assertGetDefaultDiskStoreName(expectedInVM));
+      getVM(vmIndex).invoke(() -> assertGetDefaultDiskStoreName(expectedInVM));
     }
   }
 
@@ -62,6 +63,6 @@ public class GetDefaultDiskStoreNameDUnitTest extends DistributedTestCase
{
   }
 
   private String getDefaultDiskStoreName() {
-    return GemFireCacheImpl.getDefaultDiskStoreName(); // TODO: not thread safe
+    return GemFireCacheImpl.getDefaultDiskStoreName();
   }
 }
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdAfterBounceDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdAfterBounceDistributedTest.java
index ef5305d..225729c 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdAfterBounceDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdAfterBounceDistributedTest.java
@@ -19,7 +19,7 @@ import static org.apache.geode.test.dunit.VM.getVMCount;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import org.junit.Before;
-import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -32,8 +32,8 @@ public class GetPidAndIdAfterBounceDistributedTest {
   private int[] idsBefore;
   private int[] pidsBefore;
 
-  @ClassRule
-  public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+  @Rule
+  public DistributedTestRule distributedTestRule = new DistributedTestRule();
 
   @Before
   public void setUp() throws Exception {
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdDistributedTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdDistributedTest.java
index b389538..01b8967 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetPidAndIdDistributedTest.java
@@ -18,7 +18,7 @@ import static org.apache.geode.test.dunit.VM.getVM;
 import static org.apache.geode.test.dunit.VM.getVMCount;
 import static org.assertj.core.api.Assertions.assertThat;
 
-import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -30,8 +30,8 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 @Category(DistributedTest.class)
 public class GetPidAndIdDistributedTest {
 
-  @ClassRule
-  public static DistributedTestRule distributedTestRule = new DistributedTestRule();
+  @Rule
+  public DistributedTestRule distributedTestRule = new DistributedTestRule();
 
   @Test
   public void getId_returnsVMSequentialId() throws Exception {
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetTestMethodNameDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetTestMethodNameDistributedTest.java
similarity index 79%
rename from geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetTestMethodNameDUnitTest.java
rename to geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetTestMethodNameDistributedTest.java
index 31ac51b..7c263e3 100755
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetTestMethodNameDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/GetTestMethodNameDistributedTest.java
@@ -14,18 +14,19 @@
  */
 package org.apache.geode.test.dunit.tests;
 
-import static org.assertj.core.api.Assertions.*;
+import static org.apache.geode.test.dunit.VM.getVM;
+import static org.apache.geode.test.dunit.VM.getVMCount;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.test.dunit.DistributedTestCase;
-import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
 @Category(DistributedTest.class)
 @SuppressWarnings("serial")
-public class GetTestMethodNameDUnitTest extends DistributedTestCase {
+public class GetTestMethodNameDistributedTest extends DistributedTestCase {
 
   @Test
   public void testGetTestMethodName() {
@@ -41,9 +42,8 @@ public class GetTestMethodNameDUnitTest extends DistributedTestCase {
   public void testGetTestMethodNameInAllVMs() {
     assertGetTestMethodName("testGetTestMethodNameInAllVMs");
 
-    for (int vmIndex = 0; vmIndex < Host.getHost(0).getVMCount(); vmIndex++) {
-      Host.getHost(0).getVM(vmIndex)
-          .invoke(() -> assertGetTestMethodName("testGetTestMethodNameInAllVMs"));
+    for (int vmIndex = 0; vmIndex < getVMCount(); vmIndex++) {
+      getVM(vmIndex).invoke(() -> assertGetTestMethodName("testGetTestMethodNameInAllVMs"));
     }
   }
 
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDistributedTest.java
similarity index 81%
rename from geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDUnitTest.java
rename to geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDistributedTest.java
index 1d51b9ef..d2671ee 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDistributedTest.java
@@ -14,9 +14,11 @@
  */
 package org.apache.geode.test.dunit.tests;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.apache.geode.test.dunit.Invoke.*;
-import static org.junit.Assert.*;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.apache.geode.test.dunit.Invoke.invokeInEveryVM;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 import java.util.Properties;
 
@@ -32,7 +34,7 @@ import org.apache.geode.test.junit.categories.DistributedTest;
  */
 @Category(DistributedTest.class)
 @SuppressWarnings("serial")
-public class OverridingGetPropertiesDisconnectsAllDUnitTest extends DistributedTestCase {
+public class OverridingGetPropertiesDisconnectsAllDistributedTest extends DistributedTestCase
{
 
   @Override
   public final void preTearDownAssertions() throws Exception {
@@ -46,9 +48,9 @@ public class OverridingGetPropertiesDisconnectsAllDUnitTest extends DistributedT
 
   @Override
   public Properties getDistributedSystemProperties() {
-    Properties props = new Properties();
-    props.setProperty(MCAST_PORT, "0");
-    return props;
+    Properties config = new Properties();
+    config.setProperty(MCAST_PORT, "0");
+    return config;
   }
 
   @Test
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/VMDUnitTest.java b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/VMDistributedTest.java
similarity index 92%
rename from geode-core/src/test/java/org/apache/geode/test/dunit/tests/VMDUnitTest.java
rename to geode-core/src/test/java/org/apache/geode/test/dunit/tests/VMDistributedTest.java
index 862fbd3..9b9d78b 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/tests/VMDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/tests/VMDistributedTest.java
@@ -14,7 +14,10 @@
  */
 package org.apache.geode.test.dunit.tests;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.Serializable;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -23,19 +26,19 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.test.dunit.AsyncInvocation;
+import org.apache.geode.test.dunit.DistributedTestCase;
 import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.RMIException;
 import org.apache.geode.test.dunit.SerializableRunnableIF;
 import org.apache.geode.test.dunit.VM;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
 /**
  * This class tests the functionality of the {@link VM} class.
  */
 @Category(DistributedTest.class)
-@SuppressWarnings("serial")
-public class VMDUnitTest extends JUnit4DistributedTestCase {
+@SuppressWarnings({"serial", "unused"})
+public class VMDistributedTest extends DistributedTestCase {
 
   private static final AtomicInteger COUNTER = new AtomicInteger();
   private static final boolean BOOLEAN_VALUE = true;
@@ -43,10 +46,6 @@ public class VMDUnitTest extends JUnit4DistributedTestCase {
   private static final long LONG_VALUE = 42L;
   private static final String STRING_VALUE = "BLAH BLAH BLAH";
 
-  public VMDUnitTest() {
-    super();
-  }
-
   @Test
   public void testInvokeStaticBoolean() {
     Host host = Host.getHost(0);
@@ -165,6 +164,7 @@ public class VMDUnitTest extends JUnit4DistributedTestCase {
   }
 
   private static class InvokeRunnable implements SerializableRunnableIF {
+    @Override
     public void run() {
       throw new BasicTestException();
     }
@@ -191,19 +191,19 @@ public class VMDUnitTest extends JUnit4DistributedTestCase {
     private final AtomicInteger val;
 
     public VMTestObject(int init) {
-      this.val = new AtomicInteger(init);
+      val = new AtomicInteger(init);
     }
 
     public Integer get() {
-      return new Integer(this.val.get());
+      return new Integer(val.get());
     }
 
     public Integer incrementAndGet() {
-      return new Integer(this.val.incrementAndGet());
+      return new Integer(val.incrementAndGet());
     }
 
     public void set(Integer newVal) {
-      this.val.set(newVal.intValue());
+      val.set(newVal.intValue());
     }
   }
 }

-- 
To stop receiving notification emails like this one, please contact
klund@apache.org.

Mime
View raw message