cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [4/5] git commit: Apply JUnit4 instead of JUnit3 in cayenne-server
Date Sun, 02 Nov 2014 07:22:15 GMT
Apply JUnit4 instead of JUnit3 in cayenne-server


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/f6640dd9
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/f6640dd9
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/f6640dd9

Branch: refs/heads/master
Commit: f6640dd9033330cb863fb425160492f4873c8319
Parents: e42c376
Author: Savva Kolbechev <s.kolbachev@gmail.com>
Authored: Wed Oct 29 14:04:32 2014 +0300
Committer: Savva Kolbechev <s.kolbachev@gmail.com>
Committed: Wed Oct 29 14:04:32 2014 +0300

----------------------------------------------------------------------
 .../org/apache/cayenne/BaseContextTest.java     | 22 +++--
 .../apache/cayenne/CayenneExceptionTest.java    | 15 +++-
 .../cayenne/CayenneRuntimeExceptionTest.java    | 21 ++++-
 .../org/apache/cayenne/ConfigExceptionTest.java | 13 ++-
 .../cayenne/ContextStateRecorderTest.java       | 13 ++-
 .../java/org/apache/cayenne/DataRowTest.java    |  7 +-
 .../cayenne/ObjectContextChangeLogTest.java     | 13 ++-
 .../apache/cayenne/ObjectIdRegressionTest.java  |  7 +-
 .../java/org/apache/cayenne/ObjectIdTest.java   | 33 ++++++--
 .../org/apache/cayenne/access/DbArcIdTest.java  | 11 ++-
 .../access/ManyToManyCandidateEntityTest.java   | 15 +++-
 .../cayenne/access/event/SnapshotEventTest.java |  7 +-
 .../access/jdbc/ColumnDescriptorTest.java       | 18 +++--
 .../access/jdbc/JDBCResultIteratorTest.java     | 28 ++++---
 .../cayenne/access/jdbc/SQLStatementTest.java   | 11 ++-
 .../jdbc/SQLTemplateProcessorChainTest.java     | 17 +++-
 .../jdbc/SQLTemplateProcessorSelectTest.java    | 12 ++-
 .../access/jdbc/SQLTemplateProcessorTest.java   | 26 ++++--
 .../jdbc/SQLTemplateResourceManagerTest.java    | 10 ++-
 .../cayenne/access/types/BooleanTypeTest.java   | 11 ++-
 .../cayenne/access/types/ByteArrayTypeTest.java | 10 ++-
 .../cayenne/access/types/CharTypeTest.java      |  9 ++-
 .../access/types/EnumTypeFactoryTest.java       |  7 +-
 .../cayenne/access/types/EnumTypeTest.java      | 26 ++++--
 .../access/types/ExtendedTypeMapEnumsTest.java  | 15 +++-
 .../access/types/ExtendedTypeMapTest.java       | 16 +++-
 .../cayenne/cache/EhCacheQueryCacheTest.java    | 30 ++++---
 .../cache/EhCacheQueryCache_WithConfigTest.java | 29 ++++---
 .../apache/cayenne/cache/MapQueryCacheTest.java | 13 +--
 .../apache/cayenne/cache/OSQueryCacheTest.java  | 28 ++++---
 .../configuration/CayenneRuntimeTest.java       | 10 ++-
 .../DefaultDataChannelDescriptorMergerTest.java | 17 +++-
 .../DefaultRuntimePropertiesTest.java           | 11 ++-
 .../XMLDataChannelDescriptorLoaderTest.java     | 27 ++++---
 .../osgi/OsgiClassLoaderManagerTest.java        |  8 +-
 .../server/DBCPDataSourceFactoryTest.java       | 23 +++---
 .../server/DataContextFactoryTest.java          | 17 ++--
 .../server/DataDomainProviderTest.java          | 21 +++--
 .../DefaultDataSourceFactoryLoaderTest.java     | 22 +++--
 .../server/DefaultDbAdapterFactoryTest.java     | 33 ++++----
 .../configuration/web/CayenneFilterTest.java    | 32 +++++---
 .../web/ServletContextHandlerTest.java          | 18 +++--
 .../configuration/web/WebConfigurationTest.java | 28 +++++--
 .../configuration/web/WebModuleTest.java        |  7 +-
 .../cayenne/configuration/web/WebUtilTest.java  | 13 +--
 .../apache/cayenne/conn/DataSourceInfoTest.java | 14 +++-
 .../cayenne/conn/DriverDataSourceTest.java      |  8 +-
 .../cayenne/conn/PooledConnectionImplTest.java  |  6 +-
 .../cayenne/dba/DefaultQuotingStrategyTest.java |  9 ++-
 .../dba/oracle/OracleUtilDateTypeTest.java      |  8 +-
 .../cayenne/ejbql/EJBQLExpressionTest.java      | 11 ++-
 .../cayenne/ejbql/EJBQLParserFactoryTest.java   |  8 +-
 .../cayenne/ejbql/parser/EJBQLPathTest.java     |  7 +-
 .../cayenne/event/DefaultEventManagerTest.java  | 85 +++++++++++++-------
 .../apache/cayenne/event/EventBridgeTest.java   | 18 +++--
 .../apache/cayenne/event/EventSubjectTest.java  | 35 +++++---
 .../cayenne/event/JGroupsBridgeFactoryTest.java |  7 +-
 .../cayenne/event/XMPPBridgeFactoryTest.java    |  8 +-
 .../apache/cayenne/event/XMPPBridgeTest.java    | 10 ++-
 .../cayenne/exp/BooleanExpressionTest.java      | 10 ++-
 .../cayenne/exp/ExpressionEqualsTest.java       |  9 ++-
 .../cayenne/exp/ExpressionParameterTest.java    |  7 +-
 .../cayenne/exp/ExpressionTraversalTest.java    | 12 ++-
 .../org/apache/cayenne/exp/PropertyTest.java    | 49 +++++++----
 .../cayenne/exp/parser/ASTDbPathTest.java       |  8 +-
 .../exp/parser/ASTLikeIgnoreCaseTest.java       |  9 ++-
 .../apache/cayenne/exp/parser/ASTListTest.java  | 15 ++--
 .../cayenne/exp/parser/ASTObjPathTest.java      |  8 +-
 .../cayenne/exp/parser/EvaluatorTest.java       | 24 ++++--
 .../org/apache/cayenne/graph/GraphMapTest.java  | 12 ++-
 .../org/apache/cayenne/graph/NodeDiffTest.java  |  9 ++-
 .../cayenne/log/CommonsJdbcEventLoggerTest.java | 14 ++--
 .../org/apache/cayenne/map/AttributeTest.java   |  9 ++-
 .../cayenne/map/CallbackDescriptorTest.java     |  8 +-
 .../org/apache/cayenne/map/CallbackMapTest.java |  7 +-
 .../map/ClientObjectRelationshipTest.java       |  9 ++-
 .../cayenne/map/DataMapNamespaceTest.java       | 20 +++--
 .../org/apache/cayenne/map/DataMapTest.java     | 50 +++++++++---
 .../org/apache/cayenne/map/DbAttributeTest.java | 22 ++++-
 .../java/org/apache/cayenne/map/DbJoinTest.java | 10 ++-
 .../apache/cayenne/map/DbKeyGeneratorTest.java  | 10 ++-
 .../cayenne/map/EmbeddableAttributeTest.java    |  8 +-
 .../org/apache/cayenne/map/EmbeddableTest.java  | 13 ++-
 .../cayenne/map/EntityInheritanceTreeTest.java  | 13 ++-
 .../apache/cayenne/map/MapLoaderLoadTest.java   | 25 +++---
 .../apache/cayenne/map/ObjAttributeTest.java    | 18 +++--
 .../ObjEntitySingleTableInheritanceTest.java    | 16 +++-
 .../org/apache/cayenne/map/ProcedureTest.java   | 10 ++-
 .../org/apache/cayenne/map/QueryLoaderTest.java | 16 ++--
 .../apache/cayenne/map/RelationshipTest.java    | 11 ++-
 .../cayenne/map/SQLTemplateBuilderTest.java     | 16 +++-
 .../cayenne/map/SelectQueryBuilderTest.java     | 14 +++-
 .../apache/cayenne/map/event/MapEventTest.java  | 12 ++-
 .../map/naming/LegacyNameGeneratorTest.java     |  9 ++-
 .../apache/cayenne/query/AbstractQueryTest.java | 13 ++-
 .../apache/cayenne/query/NamedQueryTest.java    | 14 +++-
 .../apache/cayenne/query/ObjectIdQueryTest.java | 15 +++-
 .../org/apache/cayenne/query/OrderingTest.java  | 30 +++++--
 .../cayenne/query/PrefetchTreeNodeTest.java     | 19 +++--
 .../cayenne/query/ProcedureQueryTest.java       | 19 ++++-
 .../apache/cayenne/query/RefreshQueryTest.java  | 22 +++--
 .../cayenne/query/RelationshipQueryTest.java    | 11 ++-
 .../cayenne/query/SelectQueryBasicsTest.java    | 30 +++++--
 .../cayenne/reflect/BasePropertyTest.java       | 10 +--
 .../cayenne/reflect/BeanAccessorTest.java       | 11 ++-
 .../cayenne/reflect/CallbackOnEntityTest.java   | 13 ++-
 .../cayenne/reflect/CallbackOnListenerTest.java |  8 +-
 .../cayenne/reflect/EnumConverterTest.java      | 14 ++--
 .../cayenne/reflect/FieldAccessorTest.java      | 13 ++-
 .../LifecycleCallbackEventHandlerTest.java      | 19 +++--
 .../reflect/PersistentDescriptorTest.java       | 13 ++-
 .../cayenne/reflect/PropertyUtilsTest.java      | 38 ++++++---
 .../DataObjectAttributePropertyTest.java        | 11 ++-
 .../cayenne/remote/RemoteSessionTest.java       | 11 ++-
 .../remote/hessian/HessianConfigTest.java       | 16 ++--
 .../hessian/service/HessianServiceTest.java     | 22 ++---
 .../remote/service/BaseRemoteServiceTest.java   | 17 ++--
 .../remote/service/DispatchHelperTest.java      | 12 ++-
 .../ClassLoaderResourceLocatorTest.java         | 12 ++-
 .../resource/FilesystemResourceLocatorTest.java | 13 ++-
 .../cayenne/resource/URLResourceTest.java       | 13 +--
 .../cayenne/unit/jira/CAY_10062004_ExpTest.java |  9 ++-
 .../apache/cayenne/unit/jira/CAY_743Test.java   |  9 ++-
 .../apache/cayenne/util/Base64CodecTest.java    | 25 +++++-
 .../cayenne/util/GenericResponseTest.java       | 11 ++-
 .../org/apache/cayenne/util/IDUtilTest.java     | 12 ++-
 .../cayenne/util/IndexPropertyListTest.java     | 10 ++-
 .../org/apache/cayenne/util/InvocationTest.java | 73 +++++++++++------
 .../apache/cayenne/util/ListResponseTest.java   | 12 ++-
 .../apache/cayenne/util/NameConverterTest.java  | 21 ++++-
 .../util/PersistentObjectHolderTest.java        | 14 +++-
 .../org/apache/cayenne/util/RegexUtilTest.java  | 10 ++-
 .../java/org/apache/cayenne/util/UtilTest.java  | 50 ++++++++++--
 .../ConcurrentLinkedHashMapTest.java            |  9 ++-
 .../validation/BeanValidationFailureTest.java   |  8 +-
 .../validation/ValidationExceptionTest.java     |  7 +-
 .../validation/ValidationResultTest.java        | 17 ++--
 137 files changed, 1623 insertions(+), 639 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/BaseContextTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/BaseContextTest.java b/cayenne-server/src/test/java/org/apache/cayenne/BaseContextTest.java
index 71bb1ce..f8582df 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/BaseContextTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/BaseContextTest.java
@@ -18,21 +18,27 @@
  ****************************************************************/
 package org.apache.cayenne;
 
-import static org.mockito.Mockito.mock;
-
-import java.util.Map;
-
-import junit.framework.TestCase;
-
 import org.apache.cayenne.cache.QueryCache;
 import org.apache.cayenne.configuration.CayenneRuntime;
 import org.apache.cayenne.di.Binder;
 import org.apache.cayenne.di.DIBootstrap;
 import org.apache.cayenne.di.Injector;
 import org.apache.cayenne.di.Module;
+import org.junit.Test;
+
+import java.util.Map;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
 
-public class BaseContextTest extends TestCase {
+public class BaseContextTest {
 
+    @Test
     public void testUserPropertiesLazyInit() {
         BaseContext context = new MockBaseContext();
         assertNull(context.userProperties);
@@ -42,6 +48,7 @@ public class BaseContextTest extends TestCase {
         assertSame(properties, context.getUserProperties());
     }
 
+    @Test
     public void testAttachToRuntimeIfNeeded() {
 
         final DataChannel channel = mock(DataChannel.class);
@@ -77,6 +84,7 @@ public class BaseContextTest extends TestCase {
         }
     }
 
+    @Test
     public void testAttachToRuntimeIfNeeded_NoStack() {
 
         BaseContext context = new MockBaseContext();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/CayenneExceptionTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CayenneExceptionTest.java b/cayenne-server/src/test/java/org/apache/cayenne/CayenneExceptionTest.java
index 4d361bd..9fac950 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/CayenneExceptionTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/CayenneExceptionTest.java
@@ -19,22 +19,30 @@
 
 package org.apache.cayenne;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
-public class CayenneExceptionTest extends TestCase {
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
+public class CayenneExceptionTest {
+
+    @Test
     public void testConstructor1() throws Exception {
         CayenneException ex = new CayenneException();
         assertNull(ex.getCause());
         assertTrue(ex.getMessage().startsWith(CayenneException.getExceptionLabel()));
     }
 
+    @Test
     public void testConstructor2() throws Exception {
         CayenneException ex = new CayenneException("abc");
         assertNull(ex.getCause());
         assertEquals(CayenneException.getExceptionLabel() + "abc", ex.getMessage());
     }
 
+    @Test
     public void testConstructor3() throws Exception {
         Throwable cause = new Throwable();
         CayenneException ex = new CayenneException(cause);
@@ -43,6 +51,7 @@ public class CayenneExceptionTest extends TestCase {
                 .getMessage());
     }
 
+    @Test
     public void testConstructor4() throws Exception {
         Throwable cause = new Throwable();
         CayenneException ex = new CayenneException("abc", cause);
@@ -50,11 +59,13 @@ public class CayenneExceptionTest extends TestCase {
         assertEquals(CayenneException.getExceptionLabel() + "abc", ex.getMessage());
     }
 
+    @Test
     public void testMessageFormatting1() throws Exception {
         CayenneException ex = new CayenneException("x%sx%sx", "a", "b");
         assertEquals("xaxbx", ex.getUnlabeledMessage());
     }
 
+    @Test
     public void testMessageFormatting2() throws Exception {
         Throwable cause = new Throwable();
         CayenneException ex = new CayenneException("x%sx%sx", cause, "a", "b");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/CayenneRuntimeExceptionTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CayenneRuntimeExceptionTest.java b/cayenne-server/src/test/java/org/apache/cayenne/CayenneRuntimeExceptionTest.java
index 8ff262f..d9019c2 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/CayenneRuntimeExceptionTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/CayenneRuntimeExceptionTest.java
@@ -19,27 +19,35 @@
 
 package org.apache.cayenne;
 
+import org.junit.Test;
+
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
 /**
  */
-public class CayenneRuntimeExceptionTest extends TestCase {
+public class CayenneRuntimeExceptionTest {
 
+    @Test
     public void testConstructor1() throws Exception {
         CayenneRuntimeException ex = new CayenneRuntimeException();
         assertNull(ex.getCause());
         assertTrue(ex.getMessage().startsWith(CayenneException.getExceptionLabel()));
     }
 
+    @Test
     public void testConstructor2() throws Exception {
         CayenneRuntimeException ex = new CayenneRuntimeException("abc");
         assertNull(ex.getCause());
         assertEquals(CayenneException.getExceptionLabel() + "abc", ex.getMessage());
     }
 
+    @Test
     public void testConstructor3() throws Exception {
         Throwable cause = new Throwable();
         CayenneRuntimeException ex = new CayenneRuntimeException(cause);
@@ -49,6 +57,7 @@ public class CayenneRuntimeExceptionTest extends TestCase {
             ex.getMessage());
     }
 
+    @Test
     public void testConstructor4() throws Exception {
         Throwable cause = new Throwable();
         CayenneRuntimeException ex = new CayenneRuntimeException("abc", cause);
@@ -56,6 +65,7 @@ public class CayenneRuntimeExceptionTest extends TestCase {
         assertEquals(CayenneException.getExceptionLabel() + "abc", ex.getMessage());
     }
 
+    @Test
     public void testThrow1() throws Exception {
         try {
             throw new CayenneRuntimeException();
@@ -66,6 +76,7 @@ public class CayenneRuntimeExceptionTest extends TestCase {
         }
     }
 
+    @Test
     public void testThrow2() throws Exception {
         try {
             try {
@@ -80,12 +91,14 @@ public class CayenneRuntimeExceptionTest extends TestCase {
             rtex.printStackTrace(new PrintWriter(w));
         }
     }
-    
+
+    @Test
     public void testMessageFormatting1() throws Exception {
         CayenneRuntimeException ex = new CayenneRuntimeException("x%sx%sx", "a", "b");
         assertEquals("xaxbx", ex.getUnlabeledMessage());
     }
-    
+
+    @Test
     public void testMessageFormatting2() throws Exception {
         Throwable cause = new Throwable();
         CayenneRuntimeException ex = new CayenneRuntimeException("x%sx%sx", cause, "a", "b");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/ConfigExceptionTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/ConfigExceptionTest.java b/cayenne-server/src/test/java/org/apache/cayenne/ConfigExceptionTest.java
index a1cbce0..c4bfd90 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/ConfigExceptionTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/ConfigExceptionTest.java
@@ -19,24 +19,32 @@
 
 package org.apache.cayenne;
 
-import junit.framework.TestCase;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
 /**
  */
-public class ConfigExceptionTest extends TestCase {
+public class ConfigExceptionTest {
 
+    @Test
     public void testConstructor1() throws Exception {
         ConfigurationException ex = new ConfigurationException();
         assertNull(ex.getCause());
         assertTrue(ex.getMessage().startsWith(CayenneException.getExceptionLabel()));
     }
 
+    @Test
     public void testConstructor2() throws Exception {
         ConfigurationException ex = new ConfigurationException("abc");
         assertNull(ex.getCause());
         assertEquals(CayenneException.getExceptionLabel() + "abc", ex.getMessage());
     }
 
+    @Test
     public void testConstructor3() throws Exception {
         Throwable cause = new Throwable();
         ConfigurationException ex = new ConfigurationException(cause);
@@ -46,6 +54,7 @@ public class ConfigExceptionTest extends TestCase {
             ex.getMessage());
     }
 
+    @Test
     public void testConstructor4() throws Exception {
         Throwable cause = new Throwable();
         ConfigurationException ex = new ConfigurationException("abc", cause);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/ContextStateRecorderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/ContextStateRecorderTest.java b/cayenne-server/src/test/java/org/apache/cayenne/ContextStateRecorderTest.java
index b1bdd16..9d9bd27 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/ContextStateRecorderTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/ContextStateRecorderTest.java
@@ -19,15 +19,19 @@
 
 package org.apache.cayenne;
 
-import junit.framework.TestCase;
-
 import org.apache.cayenne.graph.GraphManager;
 import org.apache.cayenne.graph.MockGraphManager;
+import org.junit.Test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 /**
  */
-public class ContextStateRecorderTest extends TestCase {
+public class ContextStateRecorderTest {
 
+    @Test
     public void testDirtyNodesInState() {
 
         GraphManager map = new MockGraphManager();
@@ -75,6 +79,7 @@ public class ContextStateRecorderTest extends TestCase {
         assertTrue(recorder.dirtyNodes(PersistenceState.HOLLOW).isEmpty());
     }
 
+    @Test
     public void testDirtyNodes() {
         GraphManager map = new MockGraphManager();
         ObjectContextStateLog recorder = new ObjectContextStateLog(map);
@@ -97,8 +102,8 @@ public class ContextStateRecorderTest extends TestCase {
         assertTrue(recorder.dirtyNodes().isEmpty());
     }
 
+    @Test
     public void testHasChanges() {
-
         ObjectContextStateLog recorder = new ObjectContextStateLog(new MockGraphManager());
         assertFalse(recorder.hasChanges());
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/DataRowTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/DataRowTest.java b/cayenne-server/src/test/java/org/apache/cayenne/DataRowTest.java
index e8f245b..e145cd2 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/DataRowTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/DataRowTest.java
@@ -19,10 +19,13 @@
 
 package org.apache.cayenne;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
-public class DataRowTest extends TestCase {
+import static org.junit.Assert.assertFalse;
 
+public class DataRowTest {
+
+    @Test
     public void testVersion() throws Exception {
         DataRow s1 = new DataRow(10);
         DataRow s2 = new DataRow(10);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/ObjectContextChangeLogTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/ObjectContextChangeLogTest.java b/cayenne-server/src/test/java/org/apache/cayenne/ObjectContextChangeLogTest.java
index 1b163b9..aef1c9e 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/ObjectContextChangeLogTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/ObjectContextChangeLogTest.java
@@ -19,15 +19,20 @@
 
 package org.apache.cayenne;
 
-import junit.framework.TestCase;
-
 import org.apache.cayenne.graph.CompoundDiff;
 import org.apache.cayenne.graph.GraphDiff;
 import org.apache.cayenne.graph.NodeCreateOperation;
 import org.apache.cayenne.util.Util;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
-public class ObjectContextChangeLogTest extends TestCase {
+public class ObjectContextChangeLogTest {
 
+    @Test
     public void testReset() {
         ObjectContextChangeLog recorder = new ObjectContextChangeLog();
         assertNotNull(recorder.getDiffs());
@@ -50,6 +55,7 @@ public class ObjectContextChangeLogTest extends TestCase {
         assertFalse(diff.isNoop());
     }
 
+    @Test
     public void testGetDiffs() {
         // assert that after returning, the diffs array won't get modified by
         // operation
@@ -66,6 +72,7 @@ public class ObjectContextChangeLogTest extends TestCase {
         assertEquals(2, diff2.getDiffs().size());
     }
 
+    @Test
     public void testGetDiffsSerializable() throws Exception {
         ObjectContextChangeLog recorder = new ObjectContextChangeLog();
         recorder.addOperation(new NodeCreateOperation(new ObjectId("test")));

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdRegressionTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdRegressionTest.java b/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdRegressionTest.java
index 0a8d95e..e747086 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdRegressionTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdRegressionTest.java
@@ -19,12 +19,14 @@
 
 package org.apache.cayenne;
 
+import org.junit.Test;
+
 import java.util.HashSet;
 import java.util.Set;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertTrue;
 
-public class ObjectIdRegressionTest extends TestCase {
+public class ObjectIdRegressionTest {
 
     // public void testX() {
     // for (int i = 0; i < 10000; i++) {
@@ -38,6 +40,7 @@ public class ObjectIdRegressionTest extends TestCase {
     // }
     // }
 
+    @Test
     public void testIdPool() throws Exception {
         // testing uniqueness of a sequence of ObjectIds generated quickly one after the
         // other...

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdTest.java b/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdTest.java
index 49b0b7b..f275242 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/ObjectIdTest.java
@@ -19,17 +19,24 @@
 
 package org.apache.cayenne;
 
+import org.apache.cayenne.util.Util;
+import org.apache.commons.collections.map.LinkedMap;
+import org.junit.Test;
+
 import java.math.BigDecimal;
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
-import org.apache.cayenne.util.Util;
-import org.apache.commons.collections.map.LinkedMap;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
-public class ObjectIdTest extends TestCase {
+public class ObjectIdTest {
 
+    @Test
     public void testConstructor() {
         ObjectId temp1 = new ObjectId("e");
         assertEquals("e", temp1.getEntityName());
@@ -43,6 +50,7 @@ public class ObjectIdTest extends TestCase {
         assertSame(key, temp2.getKey());
     }
 
+    @Test
     public void testSerializabilityTemp() throws Exception {
         ObjectId temp1 = new ObjectId("e");
         ObjectId temp2 = (ObjectId) Util.cloneViaSerialization(temp1);
@@ -52,6 +60,7 @@ public class ObjectIdTest extends TestCase {
         assertEquals(temp1, temp2);
     }
 
+    @Test
     public void testSerializabilityPerm() throws Exception {
         ObjectId perm1 = new ObjectId("e", "a", "b");
 
@@ -70,12 +79,14 @@ public class ObjectIdTest extends TestCase {
         assertEquals(perm1, perm2);
     }
 
+    @Test
     public void testEquals0() {
         ObjectId oid1 = new ObjectId("TE");
         assertEquals(oid1, oid1);
         assertEquals(oid1.hashCode(), oid1.hashCode());
     }
 
+    @Test
     public void testEquals1() {
         ObjectId oid1 = new ObjectId("T", "a", "b");
         ObjectId oid2 = new ObjectId("T", "a", "b");
@@ -83,6 +94,7 @@ public class ObjectIdTest extends TestCase {
         assertEquals(oid1.hashCode(), oid2.hashCode());
     }
 
+    @Test
     public void testEquals2() {
         Map hm = new HashMap();
         ObjectId oid1 = new ObjectId("T", hm);
@@ -91,6 +103,7 @@ public class ObjectIdTest extends TestCase {
         assertEquals(oid1.hashCode(), oid2.hashCode());
     }
 
+    @Test
     public void testEquals3() {
         String pknm = "xyzabc";
 
@@ -109,6 +122,7 @@ public class ObjectIdTest extends TestCase {
     /**
      * This is a test case reproducing conditions for the bug "8458963".
      */
+    @Test
     public void testEquals5() {
 
         Map hm1 = new HashMap();
@@ -127,6 +141,7 @@ public class ObjectIdTest extends TestCase {
     /**
      * Multiple key objectId
      */
+    @Test
     public void testEquals6() {
 
         Map hm1 = new HashMap();
@@ -147,6 +162,7 @@ public class ObjectIdTest extends TestCase {
      * Checks that hashCode works even if keys are inserted in the map in a
      * different order...
      */
+    @Test
     public void testEquals7() {
 
         // create maps with guaranteed iteration order
@@ -166,6 +182,7 @@ public class ObjectIdTest extends TestCase {
         assertEquals(ref.hashCode(), oid.hashCode());
     }
 
+    @Test
     public void testEqualsBinaryKey() {
 
         Map hm1 = new HashMap();
@@ -180,11 +197,13 @@ public class ObjectIdTest extends TestCase {
         assertTrue(ref.equals(oid));
     }
 
+    @Test
     public void testEqualsNull() {
         ObjectId o = new ObjectId("T", "ARTIST_ID", new Integer(42));
         assertFalse(o.equals(null));
     }
 
+    @Test
     public void testIdAsMapKey() {
         Map map = new HashMap();
         Object o1 = new Object();
@@ -204,6 +223,7 @@ public class ObjectIdTest extends TestCase {
         assertSame(o1, map.get(oid2));
     }
 
+    @Test
     public void testNotEqual1() {
 
         ObjectId oid1 = new ObjectId("T1");
@@ -211,6 +231,7 @@ public class ObjectIdTest extends TestCase {
         assertFalse(oid1.equals(oid2));
     }
 
+    @Test
     public void testNotEqual2() {
 
         Map hm1 = new HashMap();
@@ -227,6 +248,7 @@ public class ObjectIdTest extends TestCase {
     /**
      * Test different numeric types.
      */
+    @Test
     public void testEquals8() {
 
         // create maps with guaranteed iteration order
@@ -246,6 +268,7 @@ public class ObjectIdTest extends TestCase {
         assertEquals(ref.hashCode(), oid.hashCode());
     }
 
+    @Test
     public void testToString() {
         Map m1 = new HashMap();
         m1.put("a", "1");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/DbArcIdTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DbArcIdTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DbArcIdTest.java
index f973846..e9f256e 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DbArcIdTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DbArcIdTest.java
@@ -18,13 +18,17 @@
  ****************************************************************/
 package org.apache.cayenne.access;
 
-import junit.framework.TestCase;
-
 import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.map.DbRelationship;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
-public class DbArcIdTest extends TestCase {
+public class DbArcIdTest {
 
+    @Test
     public void testHashCode() {
 
         DbArcId id1 = new DbArcId(new ObjectId("x", "k", "v"),
@@ -46,6 +50,7 @@ public class DbArcIdTest extends TestCase {
         assertFalse(h1 == id3.hashCode());
     }
 
+    @Test
     public void testEquals() {
 
         DbArcId id1 = new DbArcId(new ObjectId("x", "k", "v"),

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/ManyToManyCandidateEntityTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/ManyToManyCandidateEntityTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/ManyToManyCandidateEntityTest.java
index 7be3c3d..3b91608 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/ManyToManyCandidateEntityTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/ManyToManyCandidateEntityTest.java
@@ -18,8 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.access;
 
-import junit.framework.TestCase;
-
 import org.apache.cayenne.configuration.ConfigurationNameMapper;
 import org.apache.cayenne.configuration.ConfigurationTree;
 import org.apache.cayenne.configuration.DataChannelDescriptor;
@@ -40,15 +38,21 @@ import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.map.Relationship;
 import org.apache.cayenne.map.naming.LegacyNameGenerator;
 import org.apache.cayenne.resource.URLResource;
+import org.junit.Before;
+import org.junit.Test;
 
 import java.net.URL;
 import java.util.ArrayList;
 
-public class ManyToManyCandidateEntityTest extends TestCase {
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+public class ManyToManyCandidateEntityTest {
 
     private DataMap map;
 
-    @Override
+    @Before
     public void setUp() throws Exception {
         Module testModule = new Module() {
 
@@ -74,18 +78,21 @@ public class ManyToManyCandidateEntityTest extends TestCase {
         map = tree.getRootNode().getDataMap(testConfigName);
     }
 
+    @Test
     public void testMatchingForManyToManyEntity() throws Exception {
         ObjEntity manyToManyEntity = map.getObjEntity("Table1Table2");
 
         assertNotNull(ManyToManyCandidateEntity.build(manyToManyEntity));
     }
 
+    @Test
     public void testMatchingForNotManyToManyEntity() throws Exception {
         ObjEntity entity = map.getObjEntity("Table1");
 
         assertNull(ManyToManyCandidateEntity.build(entity));
     }
 
+    @Test
     public void testOptimisationForManyToManyEntity() {
         ObjEntity manyToManyEntity = map.getObjEntity("Table1Table2");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/event/SnapshotEventTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/event/SnapshotEventTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/event/SnapshotEventTest.java
index 1446958..94a49e6 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/event/SnapshotEventTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/event/SnapshotEventTest.java
@@ -19,15 +19,18 @@
 
 package org.apache.cayenne.access.event;
 
+import org.junit.Test;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertSame;
 
-public class SnapshotEventTest extends TestCase {
+public class SnapshotEventTest {
 
+    @Test
     public void testRootEvent() {
         Object source = new Object();
         Collection<?> deleted = new ArrayList<Object>();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ColumnDescriptorTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ColumnDescriptorTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ColumnDescriptorTest.java
index 26b8155..a12fe8d 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ColumnDescriptorTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/ColumnDescriptorTest.java
@@ -19,29 +19,35 @@
 
 package org.apache.cayenne.access.jdbc;
 
-import java.sql.Types;
-
-import junit.framework.TestCase;
-
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
+import org.junit.Test;
+
+import java.sql.Types;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 /**
  */
-public class ColumnDescriptorTest extends TestCase {
+public class ColumnDescriptorTest {
 
+    @Test
     public void testName() {
         ColumnDescriptor column = new ColumnDescriptor();
         column.setName("abc");
         assertEquals("abc", column.getName());
     }
 
+    @Test
     public void testLabel() {
         ColumnDescriptor column = new ColumnDescriptor();
         column.setDataRowKey("abc");
         assertEquals("abc", column.getDataRowKey());
     }
 
+    @Test
     public void testDbAttributeConstructor() {
         DbEntity entity = new DbEntity("entity");
         DbAttribute a = new DbAttribute();
@@ -60,6 +66,7 @@ public class ColumnDescriptorTest extends TestCase {
         assertEquals(Types.VARCHAR, column.getJdbcType());
     }
 
+    @Test
     public void testEquals() {
         ColumnDescriptor column1 = new ColumnDescriptor();
         column1.setName("n1");
@@ -84,6 +91,7 @@ public class ColumnDescriptorTest extends TestCase {
         assertFalse(column3.equals(column2));
     }
 
+    @Test
     public void testHashCode() {
         ColumnDescriptor column1 = new ColumnDescriptor();
         column1.setName("n1");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java
index 869904b..4547957 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/JDBCResultIteratorTest.java
@@ -19,14 +19,9 @@
 
 package org.apache.cayenne.access.jdbc;
 
-import static org.mockito.Mockito.mock;
-
-import java.sql.Connection;
-import java.sql.Statement;
-import java.util.Collections;
-
-import junit.framework.TestCase;
-
+import com.mockrunner.mock.jdbc.MockConnection;
+import com.mockrunner.mock.jdbc.MockResultSet;
+import com.mockrunner.mock.jdbc.MockStatement;
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.access.jdbc.reader.DefaultRowReaderFactory;
 import org.apache.cayenne.access.jdbc.reader.RowReader;
@@ -34,13 +29,21 @@ import org.apache.cayenne.access.types.ExtendedTypeMap;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.map.ObjAttribute;
 import org.apache.cayenne.query.MockQueryMetadata;
+import org.junit.Test;
 
-import com.mockrunner.mock.jdbc.MockConnection;
-import com.mockrunner.mock.jdbc.MockResultSet;
-import com.mockrunner.mock.jdbc.MockStatement;
+import java.sql.Connection;
+import java.sql.Statement;
+import java.util.Collections;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
 
-public class JDBCResultIteratorTest extends TestCase {
+public class JDBCResultIteratorTest {
 
+    @Test
     public void testNextDataRow() throws Exception {
         Connection c = new MockConnection();
         Statement s = new MockStatement(c);
@@ -60,6 +63,7 @@ public class JDBCResultIteratorTest extends TestCase {
         assertEquals("1", row.get("a"));
     }
 
+    @Test
     public void testClose() throws Exception {
         Connection c = new MockConnection();
         MockStatement s = new MockStatement(c);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLStatementTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLStatementTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLStatementTest.java
index 16f2c10..88791b5 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLStatementTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLStatementTest.java
@@ -19,11 +19,17 @@
 
 package org.apache.cayenne.access.jdbc;
 
-import junit.framework.TestCase;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
 
 /**
  */
-public class SQLStatementTest extends TestCase {
+public class SQLStatementTest {
+
+    @Test
     public void testConstructor() throws Exception {
         ParameterBinding[] bindings = new ParameterBinding[0];
         SQLStatement statement = new SQLStatement("abc", bindings);
@@ -31,6 +37,7 @@ public class SQLStatementTest extends TestCase {
         assertSame(bindings, statement.getBindings());
     }
 
+    @Test
     public void testSQL() throws Exception {
         SQLStatement statement = new SQLStatement();
         statement.setSql("abc");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorChainTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorChainTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorChainTest.java
index 0b93c64..69e5bf4 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorChainTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorChainTest.java
@@ -19,14 +19,17 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import org.junit.Test;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
 
-public class SQLTemplateProcessorChainTest extends TestCase {
+public class SQLTemplateProcessorChainTest {
 
+    @Test
     public void testProcessTemplateNoChunks() throws Exception {
         // whatever is inside the chain, it should render as empty if there
         // is no chunks...
@@ -55,6 +58,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplateFullChain() throws Exception {
         String template = "#chain(' OR ')"
                 + "#chunk($a)$a#end"
@@ -71,6 +75,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("[A] OR [B] OR [C]", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplateFullChainAndPrefix() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk($a)$a#end"
@@ -87,6 +92,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("WHERE [A] OR [B] OR [C]", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplatePartialChainMiddle() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk($a)$a#end"
@@ -102,6 +108,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("WHERE [A] OR [C]", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplatePartialChainStart() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk($a)$a#end"
@@ -117,6 +124,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("WHERE [B] OR [C]", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplatePartialChainEnd() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk($a)$a#end"
@@ -132,6 +140,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("WHERE [A] OR [B]", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplateChainWithGarbage() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk($a)$a#end"
@@ -147,6 +156,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("WHERE [A] some other stuff OR [C]", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplateChainUnconditionalChunks() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk()C1#end"
@@ -160,6 +170,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("WHERE C1 OR C2 OR C3", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplateEmptyChain() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk($a)$a#end"
@@ -173,6 +184,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplateWithFalseOrZero1() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk($a)[A]#end"
@@ -188,6 +200,7 @@ public class SQLTemplateProcessorChainTest extends TestCase {
         assertEquals("WHERE [A] OR [B]", compiled.getSql());
     }
 
+    @Test
     public void testProcessTemplateWithFalseOrZero2() throws Exception {
         String template = "#chain(' OR ' 'WHERE ')"
                 + "#chunk($a)$a#end"

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorSelectTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorSelectTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorSelectTest.java
index 84a40c3..bc498c8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorSelectTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorSelectTest.java
@@ -19,12 +19,16 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import org.junit.Test;
+
 import java.util.Collections;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
-public class SQLTemplateProcessorSelectTest extends TestCase {
+public class SQLTemplateProcessorSelectTest {
 
+    @Test
     public void testProcessTemplateUnchanged() throws Exception {
         String sqlTemplate = "SELECT * FROM ME";
 
@@ -37,6 +41,7 @@ public class SQLTemplateProcessorSelectTest extends TestCase {
         assertEquals(0, compiled.getResultColumns().length);
     }
 
+    @Test
     public void testProcessSelectTemplate1() throws Exception {
         String sqlTemplate = "SELECT #result('A') FROM ME";
 
@@ -51,6 +56,7 @@ public class SQLTemplateProcessorSelectTest extends TestCase {
         assertNull(compiled.getResultColumns()[0].getJavaClass());
     }
 
+    @Test
     public void testProcessSelectTemplate2() throws Exception {
         String sqlTemplate = "SELECT #result('A' 'String') FROM ME";
 
@@ -66,6 +72,7 @@ public class SQLTemplateProcessorSelectTest extends TestCase {
         assertEquals("java.lang.String", compiled.getResultColumns()[0].getJavaClass());
     }
 
+    @Test
     public void testProcessSelectTemplate3() throws Exception {
         String sqlTemplate = "SELECT #result('A' 'String' 'B') FROM ME";
 
@@ -83,6 +90,7 @@ public class SQLTemplateProcessorSelectTest extends TestCase {
         assertEquals("java.lang.String", column.getJavaClass());
     }
 
+    @Test
     public void testProcessSelectTemplate4() throws Exception {
         String sqlTemplate = "SELECT #result('A'), #result('B'), #result('C') FROM ME";
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorTest.java
index 9b3111c..a45c068 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateProcessorTest.java
@@ -19,22 +19,25 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import org.apache.cayenne.CayenneDataObject;
+import org.apache.cayenne.DataObject;
+import org.apache.cayenne.ObjectId;
+import org.junit.Test;
+
 import java.sql.Types;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
-import org.apache.cayenne.CayenneDataObject;
-import org.apache.cayenne.DataObject;
-import org.apache.cayenne.ObjectId;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 /**
  */
-public class SQLTemplateProcessorTest extends TestCase {
+public class SQLTemplateProcessorTest {
 
+    @Test
     public void testProcessTemplateUnchanged1() throws Exception {
         String sqlTemplate = "SELECT * FROM ME";
 
@@ -46,6 +49,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertEquals(0, compiled.getBindings().length);
     }
 
+    @Test
     public void testProcessTemplateUnchanged2() throws Exception {
         String sqlTemplate = "SELECT a.b as XYZ FROM $SYSTEM_TABLE";
 
@@ -57,6 +61,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertEquals(0, compiled.getBindings().length);
     }
 
+    @Test
     public void testProcessTemplateSimpleDynamicContent() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE $a";
 
@@ -71,6 +76,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertEquals(0, compiled.getBindings().length);
     }
 
+    @Test
     public void testProcessTemplateBind() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE "
                 + "COLUMN1 = #bind($a 'VARCHAR') AND COLUMN2 = #bind($b 'INTEGER')";
@@ -86,6 +92,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertBindingValue(null, compiled.getBindings()[1]);
     }
 
+    @Test
     public void testProcessTemplateBindGuessVarchar() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE COLUMN1 = #bind($a)";
         Map map = Collections.singletonMap("a", "VALUE_OF_A");
@@ -98,6 +105,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertBindingType(Types.VARCHAR, compiled.getBindings()[0]);
     }
 
+    @Test
     public void testProcessTemplateBindGuessInteger() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE COLUMN1 = #bind($a)";
         Map map = Collections.singletonMap("a", new Integer(4));
@@ -110,6 +118,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertBindingType(Types.INTEGER, compiled.getBindings()[0]);
     }
 
+    @Test
     public void testProcessTemplateBindEqual() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE COLUMN #bindEqual($a 'VARCHAR')";
 
@@ -129,6 +138,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertBindingValue("VALUE_OF_A", compiled.getBindings()[0]);
     }
 
+    @Test
     public void testProcessTemplateBindNotEqual() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE COLUMN #bindNotEqual($a 'VARCHAR')";
 
@@ -148,6 +158,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertBindingValue("VALUE_OF_A", compiled.getBindings()[0]);
     }
 
+    @Test
     public void testProcessTemplateID() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE COLUMN1 = #bind($helper.cayenneExp($a, 'db:ID_COLUMN'))";
 
@@ -165,6 +176,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertBindingValue(new Integer(5), compiled.getBindings()[0]);
     }
 
+    @Test
     public void testProcessTemplateNotEqualID() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE "
                 + "COLUMN1 #bindNotEqual($helper.cayenneExp($a, 'db:ID_COLUMN1')) "
@@ -190,6 +202,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertBindingValue("aaa", compiled.getBindings()[1]);
     }
 
+    @Test
     public void testProcessTemplateConditions() throws Exception {
         String sqlTemplate = "SELECT * FROM ME #if($a) WHERE COLUMN1 > #bind($a)#end";
 
@@ -211,6 +224,7 @@ public class SQLTemplateProcessorTest extends TestCase {
         assertEquals(0, compiled.getBindings().length);
     }
 
+    @Test
     public void testProcessTemplateBindCollection() throws Exception {
         String sqlTemplate = "SELECT * FROM ME WHERE COLUMN IN (#bind($list 'VARCHAR'))";
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateResourceManagerTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateResourceManagerTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateResourceManagerTest.java
index b88dc67..ad7bf61 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateResourceManagerTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateResourceManagerTest.java
@@ -19,15 +19,19 @@
 
 package org.apache.cayenne.access.jdbc;
 
-import junit.framework.TestCase;
-
 import org.apache.velocity.Template;
 import org.apache.velocity.runtime.RuntimeConstants;
 import org.apache.velocity.runtime.resource.Resource;
 import org.apache.velocity.runtime.resource.ResourceManager;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
-public class SQLTemplateResourceManagerTest extends TestCase {
+public class SQLTemplateResourceManagerTest {
 
+    @Test
     public void testFetResource() throws Exception {
         SQLTemplateResourceManager rm = new SQLTemplateResourceManager();
         rm.initialize(new MockupRuntimeServices());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/types/BooleanTypeTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/types/BooleanTypeTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/types/BooleanTypeTest.java
index 195e033..83b6b0f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/types/BooleanTypeTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/types/BooleanTypeTest.java
@@ -22,19 +22,24 @@ package org.apache.cayenne.access.types;
 import java.sql.SQLException;
 import java.sql.Types;
 
-import junit.framework.TestCase;
-
 import com.mockrunner.mock.jdbc.MockResultSet;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+
 
 /**
  */
-public class BooleanTypeTest extends TestCase {
+public class BooleanTypeTest {
 
+    @Test
     public void testClassName() {
         BooleanType type = new BooleanType();
         assertEquals(Boolean.class.getName(), type.getClassName());
     }
 
+    @Test
     public void testMaterializeObjectFromResultSet() throws Exception {
         MockResultSet rs = new MockResultSet("") {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/types/ByteArrayTypeTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/types/ByteArrayTypeTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/types/ByteArrayTypeTest.java
index 7f93d08..5953da2 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/types/ByteArrayTypeTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/types/ByteArrayTypeTest.java
@@ -19,10 +19,13 @@
 
 package org.apache.cayenne.access.types;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
-public class ByteArrayTypeTest extends TestCase {
+import static org.junit.Assert.fail;
 
+public class ByteArrayTypeTest {
+
+    @Test
     public void testTrimBytes1() throws Exception {
         byte[] b1 = new byte[] {
                 1, 2, 3
@@ -31,6 +34,7 @@ public class ByteArrayTypeTest extends TestCase {
         assertByteArraysEqual(b1, b2);
     }
 
+    @Test
     public void testTrimBytes2() throws Exception {
         byte[] ref = new byte[] {
                 1, 2, 3
@@ -42,6 +46,7 @@ public class ByteArrayTypeTest extends TestCase {
         assertByteArraysEqual(ref, b2);
     }
 
+    @Test
     public void testTrimBytes3() throws Exception {
         byte[] b1 = new byte[] {
                 0, 1, 2, 3
@@ -50,6 +55,7 @@ public class ByteArrayTypeTest extends TestCase {
         assertByteArraysEqual(b1, b2);
     }
 
+    @Test
     public void testTrimBytes4() throws Exception {
         byte[] b1 = new byte[] {};
         byte[] b2 = ByteArrayType.trimBytes(b1);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/types/CharTypeTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/types/CharTypeTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/types/CharTypeTest.java
index e0e61b8..660b701 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/types/CharTypeTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/types/CharTypeTest.java
@@ -18,11 +18,14 @@
  ****************************************************************/
 package org.apache.cayenne.access.types;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
+import static org.junit.Assert.assertTrue;
 
-public class CharTypeTest extends TestCase {
-    
+
+public class CharTypeTest {
+
+    @Test
     public void testRightTrim() {
         CharType charType = new CharType(true, false);
         String trimmedStr = charType.rtrim("  text    ");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeFactoryTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeFactoryTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeFactoryTest.java
index 597476d..5a72fdc 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeFactoryTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeFactoryTest.java
@@ -18,10 +18,13 @@
  ****************************************************************/
 package org.apache.cayenne.access.types;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
-public class EnumTypeFactoryTest extends TestCase {
+import static org.junit.Assert.assertNotNull;
 
+public class EnumTypeFactoryTest {
+
+    @Test
     public void testSupportsEnums() {
         EnumTypeFactory map = new EnumTypeFactory();
         assertNotNull(map.getType(MockEnum.class));

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeTest.java
index 7a47460..18aebbd 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/types/EnumTypeTest.java
@@ -19,14 +19,18 @@
 
 package org.apache.cayenne.access.types;
 
-import java.sql.Types;
-
 import com.mockrunner.mock.jdbc.MockResultSet;
+import org.junit.Test;
+
+import java.sql.Types;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.fail;
 
-public class EnumTypeTest extends TestCase {
+public class EnumTypeTest {
 
+    @Test
     public void testConstructor() throws Exception {
         EnumType type = new EnumType(MockEnum.class);
         assertEquals(MockEnum.class.getName(), type.getClassName());
@@ -37,6 +41,7 @@ public class EnumTypeTest extends TestCase {
         }
     }
 
+    @Test
     public void testInvalidConstructor1() throws Exception {
         try {
             new EnumType(Object.class);
@@ -47,6 +52,7 @@ public class EnumTypeTest extends TestCase {
         }
     }
 
+    @Test
     public void testInvalidConstructor2() throws Exception {
         try {
             new EnumType(null);
@@ -56,7 +62,8 @@ public class EnumTypeTest extends TestCase {
             // expected
         }
     }
-    
+
+    @Test
     public void testMaterializeStringObject() throws Exception {
         EnumType type = new EnumType(MockEnum.class);
         
@@ -68,7 +75,8 @@ public class EnumTypeTest extends TestCase {
         Object o = type.materializeObject(rs, 1, Types.VARCHAR);
         assertSame(MockEnum.b, o);
     }
-    
+
+    @Test
     public void testMaterializeNumericObject() throws Exception {
         EnumType type = new EnumType(MockEnum.class);
         
@@ -80,7 +88,8 @@ public class EnumTypeTest extends TestCase {
         Object o = type.materializeObject(rs, 1, Types.NUMERIC);
         assertSame(MockEnum.c, o);
     }
-    
+
+    @Test
     public void testMaterializeStringObjectInnerEnum() throws Exception {
         EnumType type = new EnumType(InnerEnumHolder.InnerEnum.class);
         
@@ -92,7 +101,8 @@ public class EnumTypeTest extends TestCase {
         Object o = type.materializeObject(rs, 1, Types.VARCHAR);
         assertSame(InnerEnumHolder.InnerEnum.b, o);
     }
-    
+
+    @Test
     public void testMaterializeNumericObjectInnerEnum() throws Exception {
         EnumType type = new EnumType(InnerEnumHolder.InnerEnum.class);
         

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapEnumsTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapEnumsTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapEnumsTest.java
index bb32508..37b8afc 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapEnumsTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapEnumsTest.java
@@ -19,10 +19,18 @@
 
 package org.apache.cayenne.access.types;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
-public class ExtendedTypeMapEnumsTest extends TestCase {
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
+public class ExtendedTypeMapEnumsTest {
+
+    @Test
     public void testCreateType1_5() {
         ExtendedTypeMap map = new ExtendedTypeMap();
 
@@ -36,6 +44,7 @@ public class ExtendedTypeMapEnumsTest extends TestCase {
         assertNotSame(type, type2);
     }
 
+    @Test
     public void testCreateType1_5InnerEnum() {
         ExtendedTypeMap map = new ExtendedTypeMap();
 
@@ -56,6 +65,7 @@ public class ExtendedTypeMapEnumsTest extends TestCase {
         assertSame(type.getClassName(), type2.getClassName());
     }
 
+    @Test
     public void testGetDefaultType1_4() {
         ExtendedTypeMap map = new ExtendedTypeMap();
         map.internalTypeFactories.clear();
@@ -65,6 +75,7 @@ public class ExtendedTypeMapEnumsTest extends TestCase {
         assertNull(map.createType(MockEnum2.class.getName()));
     }
 
+    @Test
     public void testGetType() {
         ExtendedTypeMap map = new ExtendedTypeMap();
         ExtendedType type = map.getRegisteredType(MockEnum.class.getName());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapTest.java b/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapTest.java
index 3da31d6..fc68377 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/types/ExtendedTypeMapTest.java
@@ -19,13 +19,20 @@
 
 package org.apache.cayenne.access.types;
 
+import org.junit.Test;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
-public class ExtendedTypeMapTest extends TestCase {
+public class ExtendedTypeMapTest {
 
+    @Test
     public void testRegisterType() throws Exception {
         ExtendedTypeMap map = new ExtendedTypeMap();
         ExtendedType tstType = new MockExtendedType();
@@ -39,6 +46,7 @@ public class ExtendedTypeMapTest extends TestCase {
         assertSame(map.getDefaultType(), map.getRegisteredType(tstType.getClassName()));
     }
 
+    @Test
     public void testRegisterTypeSubclasses() throws Exception {
         ExtendedTypeMap map = new ExtendedTypeMap();
         ExtendedType tstType1 = new MockExtendedType(List.class);
@@ -74,7 +82,8 @@ public class ExtendedTypeMapTest extends TestCase {
         assertSame(tstType1, map.getRegisteredType(List.class));
         
     }
-    
+
+    @Test
     public void testRegisterArrayType() throws Exception {
         ExtendedTypeMap map = new ExtendedTypeMap();
         ByteArrayType tstType = new ByteArrayType(false, true);
@@ -93,6 +102,7 @@ public class ExtendedTypeMapTest extends TestCase {
                 .indexOf("SerializableTypeFactory") > 0);
     }
 
+    @Test
     public void testRegisteredTypeName() throws Exception {
         ExtendedTypeMap map = new ExtendedTypeMap();
         ExtendedType tstType = new MockExtendedType();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCacheTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCacheTest.java b/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCacheTest.java
index f56302d..e487dd7 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCacheTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCacheTest.java
@@ -18,31 +18,36 @@
  ****************************************************************/
 package org.apache.cayenne.cache;
 
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import net.sf.ehcache.CacheManager;
+import org.apache.cayenne.query.QueryMetadata;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.TestCase;
-import net.sf.ehcache.CacheManager;
-
-import org.apache.cayenne.query.QueryMetadata;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
-public class EhCacheQueryCacheTest extends TestCase {
+public class EhCacheQueryCacheTest {
 
     private CacheManager cacheManager;
 
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         cacheManager = new CacheManager();
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         cacheManager.shutdown();
     }
 
+    @Test
     public void testGet() {
 
         EhCacheQueryCache cache = new EhCacheQueryCache(cacheManager);
@@ -57,6 +62,7 @@ public class EhCacheQueryCacheTest extends TestCase {
         assertSame(results, cache.get(md));
     }
 
+    @Test
     public void testGet_WithFactory() {
 
         EhCacheQueryCache cache = new EhCacheQueryCache(cacheManager);
@@ -77,6 +83,7 @@ public class EhCacheQueryCacheTest extends TestCase {
         assertSame(results, cache.get(md));
     }
 
+    @Test
     public void testGet_WithFactory_WithCacheGroups() {
 
         EhCacheQueryCache cache = new EhCacheQueryCache(cacheManager);
@@ -98,6 +105,7 @@ public class EhCacheQueryCacheTest extends TestCase {
         assertSame(results, cache.get(md));
     }
 
+    @Test
     public void testRemoveGroup_WithFactory_WithCacheGroups() {
 
         EhCacheQueryCache cache = new EhCacheQueryCache(cacheManager);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCache_WithConfigTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCache_WithConfigTest.java b/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCache_WithConfigTest.java
index 95b4ea7..964abd0 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCache_WithConfigTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/cache/EhCacheQueryCache_WithConfigTest.java
@@ -18,34 +18,39 @@
  ****************************************************************/
 package org.apache.cayenne.cache;
 
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import org.apache.cayenne.query.QueryMetadata;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 import java.net.URL;
 import java.util.ArrayList;
 
-import junit.framework.TestCase;
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.CacheManager;
-
-import org.apache.cayenne.query.QueryMetadata;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
-public class EhCacheQueryCache_WithConfigTest extends TestCase {
+public class EhCacheQueryCache_WithConfigTest {
 
     protected CacheManager cacheManager;
 
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         URL config = getClass().getResource("test-ehcache.xml");
         assertNotNull(config);
         cacheManager = new CacheManager(config);
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         cacheManager.shutdown();
     }
 
+    @Test
     public void testRemoveGroup_WithFactory_WithCacheGroups() {
 
         EhCacheQueryCache cache = new EhCacheQueryCache(cacheManager);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/cache/MapQueryCacheTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/cache/MapQueryCacheTest.java b/cayenne-server/src/test/java/org/apache/cayenne/cache/MapQueryCacheTest.java
index bc00900..7f6e8ce 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/cache/MapQueryCacheTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/cache/MapQueryCacheTest.java
@@ -18,15 +18,18 @@
  ****************************************************************/
 package org.apache.cayenne.cache;
 
-import java.util.ArrayList;
-
-import junit.framework.TestCase;
-
 import org.apache.cayenne.query.MockQueryMetadata;
 import org.apache.cayenne.util.Util;
+import org.junit.Test;
+
+import java.util.ArrayList;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
-public class MapQueryCacheTest extends TestCase {
+public class MapQueryCacheTest {
 
+    @Test
     public void testSerializability() throws Exception {
 
         MapQueryCache cache = new MapQueryCache(5);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/cache/OSQueryCacheTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/cache/OSQueryCacheTest.java b/cayenne-server/src/test/java/org/apache/cayenne/cache/OSQueryCacheTest.java
index 9dfc273..230bd1c 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/cache/OSQueryCacheTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/cache/OSQueryCacheTest.java
@@ -18,21 +18,25 @@
  ****************************************************************/
 package org.apache.cayenne.cache;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import junit.framework.TestCase;
-
+import com.opensymphony.oscache.base.CacheEntry;
+import com.opensymphony.oscache.general.GeneralCacheAdministrator;
 import org.apache.cayenne.cache.OSQueryCache.RefreshSpecification;
 import org.apache.cayenne.query.MockQueryMetadata;
 import org.apache.cayenne.query.QueryMetadata;
+import org.junit.Test;
 
-import com.opensymphony.oscache.base.CacheEntry;
-import com.opensymphony.oscache.general.GeneralCacheAdministrator;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
-public class OSQueryCacheTest extends TestCase {
+public class OSQueryCacheTest {
 
+    @Test
     public void testDefaults() {
         OSQueryCache cache = new OSQueryCache();
 
@@ -43,6 +47,7 @@ public class OSQueryCacheTest extends TestCase {
                 cache.defaultRefreshSpecification.refreshPeriod);
     }
 
+    @Test
     public void testDefaultOverrides() {
 
         Properties props = new Properties();
@@ -55,6 +60,7 @@ public class OSQueryCacheTest extends TestCase {
         assertEquals(15, cache.defaultRefreshSpecification.refreshPeriod);
     }
 
+    @Test
     public void testQueryOverrides() {
 
         Properties props = new Properties();
@@ -82,7 +88,8 @@ public class OSQueryCacheTest extends TestCase {
         assertEquals("24 * * * * *", xyz.cronExpression);
         assertEquals(35, xyz.refreshPeriod);
     }
-    
+
+    @Test
     public void testGroupNames() {
 
         Properties props = new Properties();
@@ -102,6 +109,7 @@ public class OSQueryCacheTest extends TestCase {
         assertTrue(c2.getGroupNames().contains("XYZ"));
     }
 
+    @Test
     public void testSize() {
         OSQueryCache cache = new OSQueryCache();
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/configuration/CayenneRuntimeTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/CayenneRuntimeTest.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/CayenneRuntimeTest.java
index 3f7028d..a3b66d4 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/CayenneRuntimeTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/CayenneRuntimeTest.java
@@ -18,14 +18,16 @@
  ****************************************************************/
 package org.apache.cayenne.configuration;
 
-import static org.mockito.Mockito.mock;
-
 import org.apache.cayenne.di.Injector;
+import org.junit.Test;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.mockito.Mockito.mock;
 
-public class CayenneRuntimeTest extends TestCase {
+public class CayenneRuntimeTest {
 
+    @Test
     public void testBindThreadInjector() {
 
         Injector injector = mock(Injector.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultDataChannelDescriptorMergerTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultDataChannelDescriptorMergerTest.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultDataChannelDescriptorMergerTest.java
index 6114706..a1ea2dc 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultDataChannelDescriptorMergerTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultDataChannelDescriptorMergerTest.java
@@ -19,11 +19,17 @@
 package org.apache.cayenne.configuration;
 
 import org.apache.cayenne.map.DataMap;
+import org.junit.Test;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
-public class DefaultDataChannelDescriptorMergerTest extends TestCase {
+public class DefaultDataChannelDescriptorMergerTest {
 
+    @Test
     public void testSingleDescriptor() {
         DataChannelDescriptor descriptor = new DataChannelDescriptor();
         descriptor.setName("Zx");
@@ -35,6 +41,7 @@ public class DefaultDataChannelDescriptorMergerTest extends TestCase {
         assertEquals("Zx", merged.getName());
     }
 
+    @Test
     public void testMerged_Name() {
         DataChannelDescriptor d1 = new DataChannelDescriptor();
         d1.setName("Zx");
@@ -49,7 +56,8 @@ public class DefaultDataChannelDescriptorMergerTest extends TestCase {
         assertNotSame(d2, merged);
         assertEquals("Ym", merged.getName());
     }
-    
+
+    @Test
     public void testMerged_Properties() {
         DataChannelDescriptor d1 = new DataChannelDescriptor();
         d1.getProperties().put("X", "1");
@@ -67,6 +75,7 @@ public class DefaultDataChannelDescriptorMergerTest extends TestCase {
         assertEquals("4", merged.getProperties().get("Z"));
     }
 
+    @Test
     public void testMerged_DataMaps() {
         DataChannelDescriptor d1 = new DataChannelDescriptor();
         d1.setName("Zx");
@@ -92,6 +101,7 @@ public class DefaultDataChannelDescriptorMergerTest extends TestCase {
         assertSame(m21, merged.getDataMap("C"));
     }
 
+    @Test
     public void testMerge_DataNodes() {
         DataChannelDescriptor d1 = new DataChannelDescriptor();
         d1.setName("Zx");
@@ -131,6 +141,7 @@ public class DefaultDataChannelDescriptorMergerTest extends TestCase {
         assertNotSame(dn22, mergedC);
     }
 
+    @Test
     public void testMerge_DataNodesMapLinks() {
         DataChannelDescriptor d1 = new DataChannelDescriptor();
         d1.setName("Zx");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultRuntimePropertiesTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultRuntimePropertiesTest.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultRuntimePropertiesTest.java
index 2bc9290..56fefdd 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultRuntimePropertiesTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/DefaultRuntimePropertiesTest.java
@@ -18,13 +18,18 @@
  ****************************************************************/
 package org.apache.cayenne.configuration;
 
+import org.junit.Test;
+
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
-public class DefaultRuntimePropertiesTest extends TestCase {
+public class DefaultRuntimePropertiesTest {
 
+    @Test
     public void testGet_FromMap() {
         Map<String, String> propertiesMap = new HashMap<String, String>();
         propertiesMap.put("key1", "v1");
@@ -34,6 +39,7 @@ public class DefaultRuntimePropertiesTest extends TestCase {
         assertNull(properties.get("key2"));
     }
 
+    @Test
     public void testGet_FromSystem() {
 
         String userDir = System.getProperty("user.dir");
@@ -45,6 +51,7 @@ public class DefaultRuntimePropertiesTest extends TestCase {
         assertEquals(userDir, properties.get("user.dir"));
     }
 
+    @Test
     public void testGet_FromSystemOverridesMap() {
 
         String userDir = System.getProperty("user.dir");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/configuration/XMLDataChannelDescriptorLoaderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/XMLDataChannelDescriptorLoaderTest.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/XMLDataChannelDescriptorLoaderTest.java
index 24a92dc..a9c88b6 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/XMLDataChannelDescriptorLoaderTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/XMLDataChannelDescriptorLoaderTest.java
@@ -18,12 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.configuration;
 
-import java.net.URL;
-import java.util.Collection;
-import java.util.Iterator;
-
-import junit.framework.TestCase;
-
 import org.apache.cayenne.ConfigurationException;
 import org.apache.cayenne.di.AdhocObjectFactory;
 import org.apache.cayenne.di.Binder;
@@ -35,13 +29,24 @@ import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
 import org.apache.cayenne.di.spi.DefaultClassLoaderManager;
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.resource.URLResource;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.net.URL;
+import java.util.Collection;
+import java.util.Iterator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
 
-public class XMLDataChannelDescriptorLoaderTest extends TestCase {
+public class XMLDataChannelDescriptorLoaderTest {
 
     private Injector injector;
 
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         Module testModule = new Module() {
 
             public void configure(Binder binder) {
@@ -55,6 +60,7 @@ public class XMLDataChannelDescriptorLoaderTest extends TestCase {
         this.injector = DIBootstrap.createInjector(testModule);
     }
 
+    @Test
     public void testLoadEmpty() {
 
         // create and initialize loader instance to test
@@ -71,6 +77,7 @@ public class XMLDataChannelDescriptorLoaderTest extends TestCase {
         assertEquals(testConfigName, tree.getRootNode().getName());
     }
 
+    @Test
     public void testLoad_MissingConfig() throws Exception {
 
         // create and initialize loader instance to test
@@ -85,6 +92,7 @@ public class XMLDataChannelDescriptorLoaderTest extends TestCase {
         }
     }
 
+    @Test
     public void testLoadDataMap() {
 
         // create and initialize loader instance to test
@@ -106,6 +114,7 @@ public class XMLDataChannelDescriptorLoaderTest extends TestCase {
         assertEquals("testConfigMap2", maps.iterator().next().getName());
     }
 
+    @Test
     public void testLoadDataEverything() {
 
         // create and initialize loader instance to test

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManagerTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManagerTest.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManagerTest.java
index 88ff42b..bf06086 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManagerTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManagerTest.java
@@ -18,14 +18,16 @@
  ****************************************************************/
 package org.apache.cayenne.configuration.osgi;
 
-import static org.mockito.Mockito.mock;
+import org.junit.Test;
 
 import java.util.Collections;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertSame;
+import static org.mockito.Mockito.mock;
 
-public class OsgiClassLoaderManagerTest extends TestCase {
+public class OsgiClassLoaderManagerTest {
 
+    @Test
     public void testGetClassLoader() {
 
         final ClassLoader appCl = mock(ClassLoader.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/f6640dd9/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DBCPDataSourceFactoryTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DBCPDataSourceFactoryTest.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DBCPDataSourceFactoryTest.java
index d68249b..0ed02b5 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DBCPDataSourceFactoryTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DBCPDataSourceFactoryTest.java
@@ -18,20 +18,23 @@
  ****************************************************************/
 package org.apache.cayenne.configuration.server;
 
-import java.io.IOException;
-import java.net.URL;
-
-import javax.sql.DataSource;
-
-import junit.framework.TestCase;
-
 import org.apache.cayenne.configuration.DataNodeDescriptor;
-import org.apache.cayenne.configuration.server.DBCPDataSourceFactory;
 import org.apache.cayenne.resource.URLResource;
 import org.apache.commons.dbcp.BasicDataSource;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.IOException;
+import java.net.URL;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
-public class DBCPDataSourceFactoryTest extends TestCase {
+public class DBCPDataSourceFactoryTest {
 
+    @Test
     public void testGetDataSource() throws Exception {
 
         String baseUrl = getClass().getPackage().getName().replace('.', '/');
@@ -59,6 +62,7 @@ public class DBCPDataSourceFactoryTest extends TestCase {
         assertEquals("select 1 from xyz;", basicDataSource.getValidationQuery());
     }
 
+    @Test
     public void testGetDataSource_LegacyConfig() throws Exception {
 
         String baseUrl = getClass().getPackage().getName().replace('.', '/');
@@ -86,6 +90,7 @@ public class DBCPDataSourceFactoryTest extends TestCase {
         assertEquals("select 1 from xyz;", basicDataSource.getValidationQuery());
     }
 
+    @Test
     public void testGetDataSource_InvalidLocation() throws Exception {
 
         String baseUrl = getClass().getPackage().getName().replace('.', '/');


Mime
View raw message