Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace EasyMock with Mockito

Issue: SPR-10126
  • Loading branch information...
commit 05765d752062f37b202e7dfd20593c995dc47df0 1 parent a399b13
@philwebb philwebb authored
Showing with 2,349 additions and 4,292 deletions.
  1. +0 −8 build.gradle
  2. +3 −5 spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java
  3. +3 −8 spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java
  4. +4 −9 spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java
  5. +4 −7 spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java
  6. +3 −8 spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java
  7. +3 −3 spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java
  8. +4 −8 spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java
  9. +6 −20 spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
  10. +3 −3 spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java
  11. +4 −8 spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java
  12. +5 −5 spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java
  13. +4 −6 spring-beans/src/test/java/org/springframework/beans/factory/parsing/FailFastProblemReporterTests.java
  14. +2 −3 spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java
  15. +7 −13 spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java
  16. +4 −5 spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java
  17. +4 −6 spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java
  18. +3 −4 spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java
  19. +5 −6 spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java
  20. +4 −5 spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java
  21. +4 −8 spring-context/src/test/java/org/springframework/aop/config/MethodLocatingFactoryBeanTests.java
  22. +3 −5 spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java
  23. +4 −5 spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java
  24. +4 −6 spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java
  25. +4 −8 spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java
  26. +5 −5 spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java
  27. +4 −6 spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java
  28. +4 −7 spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java
  29. +3 −6 spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java
  30. +4 −7 ...context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java
  31. +3 −6 spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java
  32. +4 −6 spring-context/src/test/java/org/springframework/jndi/JndiTemplateTests.java
  33. +3 −4 spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java
  34. +3 −4 spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java
  35. +3 −2 spring-context/src/test/java/org/springframework/scripting/support/RefreshableScriptTargetSourceTests.java
  36. +3 −4 spring-context/src/test/java/org/springframework/scripting/support/ResourceScriptSourceTests.java
  37. +1 −3 spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java
  38. +4 −8 spring-core/src/test/java/org/springframework/util/StreamUtilsTests.java
  39. +3 −7 spring-core/src/test/java/org/springframework/util/xml/AbstractStaxXMLReaderTestCase.java
  40. +4 −4 spring-core/src/test/java/org/springframework/util/xml/StaxEventXMLReaderTests.java
  41. +6 −7 spring-core/src/test/java/org/springframework/util/xml/StaxStreamXMLReaderTests.java
  42. +3 −6 spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java
  43. +4 −9 spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java
  44. +6 −21 spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java
  45. +3 −6 spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java
  46. +3 −5 spring-jdbc/src/test/java/org/springframework/jdbc/core/StatementCreatorUtilsTests.java
  47. +1 −6 spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplateTests.java
  48. +4 −8 spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterQueryTests.java
  49. +3 −6 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/CallMetaDataContextTests.java
  50. +6 −9 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcCallTests.java
  51. +3 −5 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertTests.java
  52. +4 −10 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplateTests.java
  53. +3 −6 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java
  54. +4 −6 spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java
  55. +4 −4 spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcDaoSupportTests.java
  56. +4 −7 spring-jdbc/src/test/java/org/springframework/jdbc/core/support/LobSupportTests.java
  57. +5 −9 spring-jdbc/src/test/java/org/springframework/jdbc/core/support/SqlLobValueTests.java
  58. +4 −14 spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceJtaTransactionTests.java
  59. +3 −8 spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java
  60. +5 −7 spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DelegatingDataSourceTest.java
  61. +4 −4 spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DriverManagerDataSourceTests.java
  62. +4 −5 spring-jdbc/src/test/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapterTests.java
  63. +4 −5 spring-jdbc/src/test/java/org/springframework/jdbc/datasource/init/DatabasePopulatorTests.java
  64. +4 −7 spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookupTests.java
  65. +4 −8 spring-jdbc/src/test/java/org/springframework/jdbc/object/BatchSqlUpdateTests.java
  66. +4 −6 spring-jdbc/src/test/java/org/springframework/jdbc/object/GenericSqlQueryTests.java
  67. +4 −6 spring-jdbc/src/test/java/org/springframework/jdbc/object/GenericStoredProcedureTests.java
  68. +5 −13 spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlQueryTests.java
  69. +4 −6 spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlUpdateTests.java
  70. +4 −12 spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java
  71. +4 −7 spring-jdbc/src/test/java/org/springframework/jdbc/support/DataFieldMaxValueIncrementerTests.java
  72. +3 −4 spring-jdbc/src/test/java/org/springframework/jdbc/support/DefaultLobHandlerTests.java
  73. +4 −5 spring-jdbc/src/test/java/org/springframework/jdbc/support/NativeJdbcExtractorTests.java
  74. +5 −11 spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLErrorCodesFactoryTests.java
  75. +4 −6 spring-jdbc/src/test/java/org/springframework/jdbc/support/rowset/ResultSetWrappingRowSetTests.java
  76. +3 −8 spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java
  77. +3 −8 spring-jms/src/test/java/org/springframework/jms/connection/JmsTransactionManagerTests.java
  78. +3 −8 spring-jms/src/test/java/org/springframework/jms/connection/SingleConnectionFactoryTests.java
  79. +3 −9 spring-jms/src/test/java/org/springframework/jms/core/JmsTemplate102Tests.java
  80. +3 −10 spring-jms/src/test/java/org/springframework/jms/core/JmsTemplateTests.java
  81. +3 −3 spring-jms/src/test/java/org/springframework/jms/core/support/JmsGatewaySupportTests.java
  82. +3 −9 spring-jms/src/test/java/org/springframework/jms/listener/SimpleMessageListenerContainerTests.java
  83. +3 −7 spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102Tests.java
  84. +3 −12 spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessageListenerAdapterTests.java
  85. +2 −3 spring-jms/src/test/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactoryTests.java
  86. +3 −6 spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java
  87. +5 −7 spring-jms/src/test/java/org/springframework/jms/support/SimpleMessageConverter102Tests.java
  88. +3 −8 spring-jms/src/test/java/org/springframework/jms/support/SimpleMessageConverterTests.java
  89. +3 −7 spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJackson2MessageConverterTests.java
  90. +3 −7 spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJacksonMessageConverterTests.java
  91. +3 −7 spring-jms/src/test/java/org/springframework/jms/support/converter/MarshallingMessageConverterTests.java
  92. +2 −3 spring-jms/src/test/java/org/springframework/jms/support/destination/DynamicDestinationResolverTests.java
  93. +3 −4 spring-jms/src/test/java/org/springframework/jms/support/destination/JmsDestinationAccessorTests.java
  94. +3 −7 spring-jms/src/test/java/org/springframework/jms/support/destination/JndiDestinationResolverTests.java
  95. +3 −12 spring-orm/src/test/java/org/springframework/orm/hibernate3/HibernateInterceptorTests.java
  96. +3 −14 spring-orm/src/test/java/org/springframework/orm/hibernate3/HibernateJtaTransactionTests.java
  97. +3 −14 spring-orm/src/test/java/org/springframework/orm/hibernate3/HibernateTemplateTests.java
  98. +3 −7 spring-orm/src/test/java/org/springframework/orm/hibernate3/LocalSessionFactoryBeanTests.java
  99. +3 −3 spring-orm/src/test/java/org/springframework/orm/hibernate3/support/HibernateDaoSupportTests.java
  100. +3 −5 spring-orm/src/test/java/org/springframework/orm/hibernate3/support/LobTypeTests.java
  101. +3 −10 spring-orm/src/test/java/org/springframework/orm/hibernate3/support/OpenSessionInViewTests.java
  102. +3 −7 spring-orm/src/test/java/org/springframework/orm/ibatis/SqlMapClientTests.java
  103. +3 −7 spring-orm/src/test/java/org/springframework/orm/ibatis/support/LobTypeHandlerTests.java
  104. +3 −5 spring-orm/src/test/java/org/springframework/orm/jdo/JdoInterceptorTests.java
  105. +3 −8 spring-orm/src/test/java/org/springframework/orm/jdo/JdoTemplateTests.java
  106. +1 −4 spring-orm/src/test/java/org/springframework/orm/jdo/JdoTransactionManagerTests.java
  107. +3 −5 spring-orm/src/test/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryTests.java
  108. +3 −3 spring-orm/src/test/java/org/springframework/orm/jdo/support/JdoDaoSupportTests.java
  109. +3 −7 spring-orm/src/test/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewTests.java
  110. +3 −5 spring-orm/src/test/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBeanTests.java
  111. +3 −5 spring-orm/src/test/java/org/springframework/orm/jpa/DefaultJpaDialectTests.java
  112. +2 −2 spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryBeanSupportTests.java
  113. +3 −7 spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryUtilsTests.java
  114. +3 −9 spring-orm/src/test/java/org/springframework/orm/jpa/JpaInterceptorTests.java
  115. +3 −8 spring-orm/src/test/java/org/springframework/orm/jpa/JpaTemplateTests.java
  116. +3 −11 spring-orm/src/test/java/org/springframework/orm/jpa/JpaTransactionManagerTests.java
  117. +3 −13 spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java
  118. +3 −4 spring-orm/src/test/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBeanTests.java
  119. +3 −5 spring-orm/src/test/java/org/springframework/orm/jpa/support/JpaDaoSupportTests.java
  120. +3 −11 spring-orm/src/test/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewTests.java
  121. +3 −9 spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java
  122. +3 −8 spring-orm/src/test/java/org/springframework/orm/jpa/support/SharedEntityManagerFactoryTests.java
  123. +21 −30 spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java
  124. +26 −40 spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java
  125. +10 −14 spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java
  126. +26 −25 spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java
  127. +13 −19 spring-struts/src/test/java/org/springframework/web/struts/StrutsSupportTests.java
  128. +14 −33 spring-test-mvc/src/test/java/org/springframework/test/web/servlet/DefaultMvcResultTests.java
  129. +10 −18 spring-test/src/test/java/org/springframework/mock/web/MockFilterChainTests.java
  130. +41 −62 spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java
  131. +260 −429 spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java
  132. +74 −116 spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java
  133. +9 −23 spring-tx/src/test/java/org/springframework/jca/support/LocalConnectionFactoryBeanTests.java
  134. +32 −67 spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java
  135. +238 −613 spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java
  136. +56 −112 spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java
  137. +11 −14 spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java
  138. +10 −15 spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java
  139. +5 −5 spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java
  140. +2 −2 spring-web/src/test/java/org/springframework/http/MockHttpOutputMessage.java
  141. +2 −3 spring-web/src/test/java/org/springframework/http/converter/FormHttpMessageConverterTests.java
  142. +11 −15 spring-web/src/test/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverterTests.java
  143. +24 −103 spring-web/src/test/java/org/springframework/remoting/jaxrpc/JaxRpcSupportTests.java
  144. +20 −46 spring-web/src/test/java/org/springframework/web/client/DefaultResponseErrorHandlerTests.java
  145. +26 −60 spring-web/src/test/java/org/springframework/web/client/HttpMessageConverterExtractorTests.java
  146. +281 −319 spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java
  147. +9 −18 spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java
  148. +12 −25 spring-web/src/test/java/org/springframework/web/context/request/async/DeferredResultTests.java
  149. +7 −17 ...ng-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java
  150. +75 −128 spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java
  151. +21 −38 spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java
  152. +47 −90 spring-web/src/test/java/org/springframework/web/filter/CharacterEncodingFilterTests.java
  153. +17 −22 spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java
  154. +8 −21 spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java
  155. +18 −40 spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java
  156. +7 −14 spring-web/src/test/java/org/springframework/web/multipart/support/ByteArrayMultipartFileEditorTests.java
  157. +8 −12 spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletRequestAttributesTests.java
  158. +33 −69 spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/util/PortletUtilsTests.java
  159. +9 −15 spring-webmvc-tiles3/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewResolverTests.java
  160. +7 −19 spring-webmvc-tiles3/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewTests.java
  161. +1 −2  spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java
  162. +37 −62 spring-webmvc/src/test/java/org/springframework/web/servlet/HandlerExecutionChainTests.java
  163. +50 −48 ...mvc/src/test/java/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfigurationTests.java
  164. +18 −29 spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ControllerTests.java
  165. +32 −52 ...src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java
  166. +9 −25 ...test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java
  167. +31 −60 ...java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorMockTests.java
  168. +5 −5 spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java
  169. +4 −9 spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/FormTagTests.java
  170. +13 −32 spring-webmvc/src/test/java/org/springframework/web/servlet/view/BaseViewTests.java
  171. +96 −158 spring-webmvc/src/test/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolverTests.java
  172. +32 −50 spring-webmvc/src/test/java/org/springframework/web/servlet/view/InternalResourceViewTests.java
  173. +17 −29 spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java
  174. +19 −39 spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerViewTests.java
  175. +6 −8 ...webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsViewTests.java
  176. +7 −11 spring-webmvc/src/test/java/org/springframework/web/servlet/view/json/MappingJackson2JsonViewTests.java
  177. +7 −11 spring-webmvc/src/test/java/org/springframework/web/servlet/view/json/MappingJacksonJsonViewTests.java
  178. +26 −62 spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewTests.java
  179. +11 −22 spring-webmvc/src/test/java/org/springframework/web/servlet/view/xml/MarshallingViewTests.java
  180. +6 −11 ...est/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java
View
8 build.gradle
@@ -13,7 +13,6 @@ configure(allprojects) { project ->
version = qualifyVersionIfNecessary(version)
ext.aspectjVersion = "1.7.2"
- ext.easymockVersion = "2.5.2"
ext.hsqldbVersion = "1.8.0.10"
ext.junitVersion = "4.11"
ext.slf4jVersion = "1.6.1"
@@ -69,13 +68,6 @@ configure(allprojects) { project ->
testCompile("junit:junit:${junitVersion}")
testCompile("org.hamcrest:hamcrest-all:1.3")
testCompile("org.mockito:mockito-core:1.9.5")
- if (project.name in ["spring",
- "spring-orm-hibernate4", "spring-oxm", "spring-struts",
- "spring-test", "spring-test-mvc", "spring-tx", "spring-web",
- "spring-webmvc", "spring-webmvc-portlet", "spring-webmvc-tiles3"]) {
- testCompile("org.easymock:easymock:${easymockVersion}")
- testCompile "org.easymock:easymockclassextension:${easymockVersion}"
- }
}
ext.javadocLinks = [
View
8 spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java
@@ -16,11 +16,6 @@
package org.springframework.aop.framework.adapter;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
@@ -33,6 +28,9 @@
import org.springframework.aop.ThrowsAdvice;
import org.springframework.tests.aop.advice.MethodCounter;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
View
11 spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java
@@ -16,18 +16,13 @@
package org.springframework.aop.interceptor;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rob Harrop
* @author Rick Evans
View
13 spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,18 +16,13 @@
package org.springframework.aop.interceptor;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Unit tests for the {@link DebugInterceptor} class.
*
View
11 spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,16 +16,13 @@
package org.springframework.aop.interceptor;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rob Harrop
* @author Rick Evans
View
11 spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java
@@ -16,18 +16,13 @@
package org.springframework.aop.interceptor;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Unit tests for the {@link SimpleTraceInterceptor} class.
*
View
6 spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,11 @@
package org.springframework.aop.scope;
-import static org.mockito.Mockito.mock;
-
import org.junit.Test;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import static org.mockito.BDDMockito.*;
+
/**
* Unit tests for the {@link DefaultScopedObject} class.
*
View
12 spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java
@@ -16,14 +16,6 @@
package org.springframework.aop.support;
-import static org.hamcrest.Matchers.instanceOf;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
import java.io.Serializable;
import org.aopalliance.intercept.MethodInterceptor;
@@ -41,6 +33,10 @@
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
* @author Chris Beams
View
26 spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
@@ -16,24 +16,6 @@
package org.springframework.beans.factory;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.equalTo;
-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.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.isNull;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-
import java.io.Closeable;
import java.lang.reflect.Field;
import java.net.MalformedURLException;
@@ -104,6 +86,10 @@
import org.springframework.util.StopWatch;
import org.springframework.util.StringValueResolver;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Tests properties population and autowire behavior.
*
@@ -2261,8 +2247,8 @@ public void testContainsBeanReturnsTrueEvenForAbstractBeanDefinition() {
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
bf.registerBeanDefinition("abs", BeanDefinitionBuilder
.rootBeanDefinition(TestBean.class).setAbstract(true).getBeanDefinition());
- assertThat(bf.containsBean("abs"), is(true));
- assertThat(bf.containsBean("bogus"), is(false));
+ assertThat(bf.containsBean("abs"), equalTo(true));
+ assertThat(bf.containsBean("bogus"), equalTo(false));
}
@Test
View
6 spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java
@@ -16,9 +16,6 @@
package org.springframework.beans.factory.config;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
import java.util.HashMap;
import java.util.Map;
@@ -26,6 +23,9 @@
import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Unit tests for {@link CustomScopeConfigurer}.
*
View
12 ...-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java
@@ -16,14 +16,6 @@
package org.springframework.beans.factory.config;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.springframework.tests.TestResourceUtils.qualifiedResource;
-
import java.util.Date;
import javax.inject.Provider;
@@ -38,6 +30,10 @@
import org.springframework.core.io.Resource;
import org.springframework.util.SerializationTestUtils;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+import static org.springframework.tests.TestResourceUtils.*;
+
/**
* @author Colin Sampaleanu
* @author Juergen Hoeller
View
10 spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,10 +16,6 @@
package org.springframework.beans.factory.config;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition;
-
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@@ -30,6 +26,10 @@
import org.springframework.core.NestedCheckedException;
import org.springframework.core.NestedRuntimeException;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*;
+
/**
* Unit tests for {@link ServiceLocatorFactoryBean}.
*
View
10 spring-beans/src/test/java/org/springframework/beans/factory/parsing/FailFastProblemReporterTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,13 @@
package org.springframework.beans.factory.parsing;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.apache.commons.logging.Log;
import org.junit.Test;
import org.springframework.core.io.DescriptiveResource;
+import static org.mockito.Matchers.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rick Evans
* @author Juergen Hoeller
View
5 spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java
@@ -16,9 +16,6 @@
package org.springframework.beans.factory.wiring;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
import junit.framework.TestCase;
import org.springframework.beans.factory.BeanFactory;
@@ -26,6 +23,8 @@
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.tests.sample.beans.TestBean;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rick Evans
View
20 spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java
@@ -16,15 +16,6 @@
package org.springframework.scheduling.quartz;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
@@ -52,19 +43,22 @@
import org.quartz.TriggerListener;
import org.quartz.impl.SchedulerRepository;
import org.quartz.spi.JobFactory;
-import org.springframework.tests.context.TestMethodInvokingTask;
-import org.springframework.tests.sample.beans.TestBean;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.factory.support.StaticListableBeanFactory;
-import org.springframework.tests.Assume;
-import org.springframework.tests.TestGroup;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.StaticApplicationContext;
import org.springframework.core.io.FileSystemResourceLoader;
import org.springframework.core.task.TaskExecutor;
import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.tests.Assume;
+import org.springframework.tests.TestGroup;
+import org.springframework.tests.context.TestMethodInvokingTask;
+import org.springframework.tests.sample.beans.TestBean;
+
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* @author Juergen Hoeller
View
9 spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java
@@ -16,18 +16,17 @@
package org.springframework.aop.aspectj;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.junit.Before;
import org.junit.Test;
import org.springframework.aop.aspectj.AdviceBindingTestAspect.AdviceBindingCollaborator;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* Tests for various parameter binding scenarios with before advice.
View
10 spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java
@@ -16,19 +16,17 @@
package org.springframework.aop.aspectj;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
-
import org.junit.Before;
import org.junit.Test;
import org.springframework.aop.aspectj.AfterReturningAdviceBindingTestAspect.AfterReturningAdviceBindingCollaborator;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* Tests for various parameter binding scenarios with before advice.
View
7 spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java
@@ -16,14 +16,13 @@
package org.springframework.aop.aspectj;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.junit.Before;
import org.junit.Test;
import org.springframework.aop.aspectj.AfterThrowingAdviceBindingTestAspect.AfterThrowingAdviceBindingCollaborator;
-import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.tests.sample.beans.ITestBean;
+
+import static org.mockito.BDDMockito.*;
/**
* Tests for various parameter binding scenarios with before advice.
View
11 spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java
@@ -16,20 +16,19 @@
package org.springframework.aop.aspectj;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.aspectj.lang.ProceedingJoinPoint;
import org.junit.Before;
import org.junit.Test;
import org.springframework.aop.aspectj.AroundAdviceBindingTestAspect.AroundAdviceBindingCollaborator;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
-import org.springframework.tests.sample.beans.ITestBean;
-import org.springframework.tests.sample.beans.TestBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.tests.sample.beans.ITestBean;
+import org.springframework.tests.sample.beans.TestBean;
+
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* Tests for various parameter binding scenarios with before advice.
View
9 spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java
@@ -16,18 +16,17 @@
package org.springframework.aop.aspectj;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.junit.Before;
import org.junit.Test;
import org.springframework.aop.aspectj.AdviceBindingTestAspect.AdviceBindingCollaborator;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* Tests for various parameter binding scenarios with before advice.
View
12 spring-context/src/test/java/org/springframework/aop/config/MethodLocatingFactoryBeanTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,19 +16,15 @@
package org.springframework.aop.config;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.lang.reflect.Method;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rick Evans
* @author Chris Beams
View
8 spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java
@@ -16,21 +16,19 @@
package org.springframework.aop.framework;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
import java.io.Serializable;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
-
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
import org.springframework.aop.support.AopUtils;
import org.springframework.tests.sample.beans.IOther;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @since 13.03.2003
* @author Rod Johnson
View
9 spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,13 +16,12 @@
package org.springframework.context.access;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.junit.Test;
import org.springframework.context.ConfigurableApplicationContext;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Unit test for {@link ContextBeanFactoryReference}
*
View
10 spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,6 @@
package org.springframework.context.annotation;
-import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
-
import java.lang.instrument.ClassFileTransformer;
import org.junit.Test;
@@ -28,6 +23,9 @@
import org.springframework.context.support.GenericXmlApplicationContext;
import org.springframework.instrument.classloading.LoadTimeWeaver;
+import static org.mockito.Matchers.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Unit tests for @EnableLoadTimeWeaving
*
View
12 spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java
@@ -20,16 +20,8 @@
import java.util.Set;
import org.aopalliance.intercept.MethodInvocation;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.junit.Test;
-
import org.springframework.aop.framework.ProxyFactory;
-import org.springframework.tests.sample.beans.TestBean;
import org.springframework.beans.factory.config.RuntimeBeanReference;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.ApplicationContext;
@@ -39,6 +31,10 @@
import org.springframework.context.BeanThatListens;
import org.springframework.context.support.StaticApplicationContext;
import org.springframework.core.Ordered;
+import org.springframework.tests.sample.beans.TestBean;
+
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* Unit and integration tests for the ApplicationContext event support.
View
10 spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java
@@ -16,21 +16,21 @@
package org.springframework.context.event;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-
import org.junit.Before;
import org.junit.Test;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.beans.BeansException;
-import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.beans.MutablePropertyValues;
-import org.springframework.tests.sample.beans.TestBean;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.TestListener;
import org.springframework.context.support.StaticApplicationContext;
+import org.springframework.tests.sample.beans.ITestBean;
+import org.springframework.tests.sample.beans.TestBean;
+
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* @author Dmitriy Kopylenko
View
10 spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,6 @@
package org.springframework.ejb.access;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import javax.ejb.CreateException;
import javax.ejb.EJBLocalHome;
import javax.ejb.EJBLocalObject;
@@ -31,6 +26,9 @@
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.jndi.JndiTemplate;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
* @author Juergen Hoeller
View
11 spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,6 @@
package org.springframework.ejb.access;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
-
import java.lang.reflect.Proxy;
import javax.ejb.CreateException;
@@ -32,6 +26,9 @@
import org.junit.Test;
import org.springframework.jndi.JndiTemplate;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
* @author Juergen Hoeller
View
9 spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java
@@ -16,12 +16,6 @@
package org.springframework.ejb.access;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
import java.rmi.ConnectException;
import java.rmi.RemoteException;
@@ -36,6 +30,9 @@
import org.springframework.jndi.JndiTemplate;
import org.springframework.remoting.RemoteAccessException;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
* @author Juergen Hoeller
View
11 ...text/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,6 @@
package org.springframework.ejb.access;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
-
import java.lang.reflect.Proxy;
import java.rmi.RemoteException;
@@ -34,6 +28,9 @@
import org.springframework.jndi.JndiTemplate;
import org.springframework.remoting.RemoteAccessException;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
* @author Juergen Hoeller
View
9 spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java
@@ -16,12 +16,6 @@
package org.springframework.jndi;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
import javax.naming.Context;
import javax.naming.NamingException;
@@ -31,6 +25,9 @@
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
* @author Juergen Hoeller
View
10 spring-context/src/test/java/org/springframework/jndi/JndiTemplateTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,16 +16,14 @@
package org.springframework.jndi;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import javax.naming.Context;
import javax.naming.NameNotFoundException;
import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
* @author Juergen Hoeller
View
7 spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java
@@ -16,9 +16,6 @@
package org.springframework.scripting.bsh;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
import java.util.Arrays;
import java.util.Collection;
@@ -26,7 +23,6 @@
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.target.dynamic.Refreshable;
-import org.springframework.tests.sample.beans.TestBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -38,6 +34,9 @@
import org.springframework.scripting.ScriptSource;
import org.springframework.scripting.TestBeanAwareMessenger;
import org.springframework.scripting.support.ScriptFactoryPostProcessor;
+import org.springframework.tests.sample.beans.TestBean;
+
+import static org.mockito.BDDMockito.*;
/**
* @author Rob Harrop
View
7 spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java
@@ -16,16 +16,16 @@
package org.springframework.scripting.groovy;
+import groovy.lang.DelegatingMetaClass;
+import groovy.lang.GroovyObject;
+
import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Map;
-import groovy.lang.DelegatingMetaClass;
-import groovy.lang.GroovyObject;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
-
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.target.dynamic.Refreshable;
import org.springframework.beans.factory.BeanCreationException;
@@ -52,7 +52,6 @@
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
-import static org.mockito.Mockito.mock;
/**
* @author Rob Harrop
View
5 spring-context/src/test/java/org/springframework/scripting/support/RefreshableScriptTargetSourceTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,12 @@
package org.springframework.scripting.support;
-import static org.mockito.Mockito.mock;
import junit.framework.TestCase;
import org.springframework.beans.factory.BeanFactory;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rick Evans
*/
View
7 spring-context/src/test/java/org/springframework/scripting/support/ResourceScriptSourceTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,6 @@
package org.springframework.scripting.support;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -27,6 +24,8 @@
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rick Evans
* @author Juergen Hoeller
View
4 spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java
@@ -16,11 +16,8 @@
package org.springframework.scripting.support;
-import static org.mockito.Mockito.mock;
-
import org.junit.Before;
import org.junit.Test;
-
import org.springframework.beans.FatalBeanException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
@@ -34,6 +31,7 @@
import org.springframework.tests.TestGroup;
import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* @author Rick Evans
View
12 spring-core/src/test/java/org/springframework/util/StreamUtilsTests.java
@@ -16,14 +16,6 @@
package org.springframework.util;
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
@@ -36,6 +28,10 @@
import org.junit.Test;
import org.mockito.InOrder;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Tests for {@link StreamUtils}.
*
View
10 spring-core/src/test/java/org/springframework/util/xml/AbstractStaxXMLReaderTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,6 @@
package org.springframework.util.xml;
-import static org.mockito.BDDMockito.willAnswer;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-
import java.io.InputStream;
import javax.xml.stream.XMLInputFactory;
@@ -44,6 +38,8 @@
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.helpers.XMLReaderFactory;
+import static org.mockito.BDDMockito.*;
+
public abstract class AbstractStaxXMLReaderTestCase {
protected static XMLInputFactory inputFactory;
View
8 spring-core/src/test/java/org/springframework/util/xml/StaxEventXMLReaderTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,9 @@
package org.springframework.util.xml;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.io.InputStream;
import java.io.StringReader;
+
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
@@ -29,6 +27,8 @@
import org.xml.sax.InputSource;
import org.xml.sax.helpers.AttributesImpl;
+import static org.mockito.BDDMockito.*;
+
public class StaxEventXMLReaderTests extends AbstractStaxXMLReaderTestCase {
public static final String CONTENT = "<root xmlns='http://springframework.org/spring-ws'><child/></root>";
View
13 spring-core/src/test/java/org/springframework/util/xml/StaxStreamXMLReaderTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,23 +18,22 @@
import java.io.InputStream;
import java.io.StringReader;
+
import javax.xml.namespace.QName;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import org.junit.Test;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
import org.xml.sax.Locator;
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.*;
+import static org.mockito.BDDMockito.*;
+
public class StaxStreamXMLReaderTests extends AbstractStaxXMLReaderTestCase {
public static final String CONTENT = "<root xmlns='http://springframework.org/spring-ws'><child/></root>";
View
9 spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java
@@ -16,12 +16,6 @@
package org.springframework.jdbc.core;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -35,6 +29,9 @@
import org.springframework.jdbc.datasource.SingleConnectionDataSource;
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Mock object based abstract class for RowMapper tests.
* Initializes mock objects and verifies results.
View
13 spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,14 +16,6 @@
package org.springframework.jdbc.core;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Connection;
@@ -43,6 +35,9 @@
import org.junit.rules.ExpectedException;
import org.springframework.dao.IncorrectResultSizeDataAccessException;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Juergen Hoeller
* @author Phillip Webb
View
27 spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,26 +16,6 @@
package org.springframework.jdbc.core;
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.instanceOf;
-import static org.hamcrest.Matchers.sameInstance;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.BDDMockito.willThrow;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.springframework.tests.Matchers.exceptionCause;
-
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
@@ -71,6 +51,11 @@
import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter;
import org.springframework.util.LinkedCaseInsensitiveMap;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+import static org.springframework.tests.Matchers.*;
+
/**
* Mock object based tests for JdbcTemplate.
*
View
9 spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java
@@ -16,11 +16,6 @@
package org.springframework.jdbc.core;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -34,9 +29,11 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.springframework.tests.sample.beans.TestBean;
import org.springframework.jdbc.datasource.SingleConnectionDataSource;
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
+import org.springframework.tests.sample.beans.TestBean;
+
+import static org.mockito.BDDMockito.*;
/**
* @author Juergen Hoeller
View
8 spring-jdbc/src/test/java/org/springframework/jdbc/core/StatementCreatorUtilsTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,10 +16,6 @@
package org.springframework.jdbc.core;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
@@ -30,6 +26,8 @@
import org.junit.Before;
import org.junit.Test;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Juergen Hoeller
* @since 31.08.2004
View
7 spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplateTests.java
@@ -27,13 +27,13 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.Customer;
import org.springframework.jdbc.core.JdbcOperations;
@@ -46,11 +46,6 @@
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
/**
* @author Rick Evans
View
12 spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterQueryTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,13 +16,6 @@
package org.springframework.jdbc.core.namedparam;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -42,6 +35,9 @@
import org.junit.Test;
import org.springframework.jdbc.core.RowMapper;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Thomas Risberg
* @author Phillip Webb
View
9 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/CallMetaDataContextTests.java
@@ -1,11 +1,5 @@
package org.springframework.jdbc.core.simple;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.Types;
@@ -24,6 +18,9 @@
import org.springframework.jdbc.core.metadata.CallMetaDataContext;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Mock object based tests for CallMetaDataContext.
*
View
15 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcCallTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,14 +16,6 @@
package org.springframework.jdbc.core.simple;
-import static org.hamcrest.Matchers.sameInstance;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.springframework.tests.Matchers.exceptionCause;
-
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
@@ -43,6 +35,11 @@
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+import static org.springframework.tests.Matchers.*;
+
/**
* Mock object based tests for SimpleJdbcCall.
*
View
8 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,10 +16,6 @@
package org.springframework.jdbc.core.simple;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
@@ -34,6 +30,8 @@
import org.junit.rules.ExpectedException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
+import static org.mockito.BDDMockito.*;
+
/**
* Mock object based tests for SimpleJdbcInsert.
*
View
14 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplateTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,6 @@
package org.springframework.jdbc.core.simple;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
@@ -48,6 +39,9 @@
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Rod Johnson
* @author Rob Harrop
View
9 spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java
@@ -16,12 +16,6 @@
package org.springframework.jdbc.core.simple;
-import static org.junit.Assert.*;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
@@ -38,6 +32,9 @@
import org.springframework.jdbc.core.metadata.TableMetaDataContext;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* Mock object based tests for TableMetaDataContext.
*
View
10 spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java
@@ -16,11 +16,6 @@
package org.springframework.jdbc.core.support;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
@@ -28,8 +23,11 @@
import javax.sql.DataSource;
import org.junit.Test;
-import org.springframework.tests.sample.beans.TestBean;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.tests.sample.beans.TestBean;
+
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
/**
* @author Rod Johnson
View
8 spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcDaoSupportTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,6 @@
package org.springframework.jdbc.core.support;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.mock;
-
import java.util.ArrayList;
import java.util.List;
@@ -27,6 +24,9 @@
import org.junit.Test;
import org.springframework.jdbc.core.JdbcTemplate;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Juergen Hoeller
* @since 30.07.2003
View
11 spring-jdbc/src/test/java/org/springframework/jdbc/core/support/LobSupportTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,6 @@
package org.springframework.jdbc.core.support;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.io.IOException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@@ -36,6 +30,9 @@
import org.springframework.jdbc.support.lob.LobCreator;
import org.springframework.jdbc.support.lob.LobHandler;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**
* @author Alef Arendsen
*/
View
14 spring-jdbc/src/test/java/org/springframework/jdbc/core/support/SqlLobValueTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,14 +15,6 @@
*/
package org.springframework.jdbc.core.support;
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -40,6 +32,10 @@
import org.springframework.jdbc.support.lob.LobCreator;
import org.springframework.jdbc.support.lob.LobHandler;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+import static org.mockito.BDDMockito.*;
+
/**