List/Grid Tag Archives: Testing

Mockito – Better error messages on NPE with globally configured SmartNull
Writing the Mockito reference card I had an opportunity to take a closer look at the less popular, but very useful features of Mockito. Some of them were too advance or too rare in ...

Spring MVC Integration Tests
An approach to Integration Testing the controllers in Spring MVC is to use the Integration Test support provided by Spring. With Junit4 this ...

EasyMock tutorial – Getting Started
In this post, I’m going to show you what EasyMock is and how you can use it for testing your java application. For this purpose, I’m going to create a simple Portfolio application ...

Testing legacy code: Hard-wired dependencies
When pairing with some developers, I’ve noticed that one of the reasons they are not unit testing existing code is because, quite often, they don’t know how to overcome ...

Test-driving Builders with Mockito and Hamcrest
A lot of people asked me in the past if I test getters and setters (properties, attributes, etc). They also asked me if I test my builders. The answer, in my case is it depends. When ...

NoSQLUnit 0.3.0 Released
Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these are Fast, Isolated, ...

Moving Beyond Core Hamcrest in JUnit
In the post Improving On assertEquals with JUnit and Hamcrest I introduced use of Hamcrest with JUnit. I then looked at JUnit’s Built-in Hamcrest Core Matcher Support. In this ...

Testing Abstract Classes and Template Method Pattern
From wikipedia “A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to allow differing behaviors ...

Java EE 6 Testing Part II – Introduction to Arquillian and ShrinkWrap
In Java EE 6 Testing Part I I briefly introduced the EJB 3.1 Embeddable API using Glassfish embedded container to demonstrate how to start the container, lookup a bean in the project ...

Java EE 6 Testing Part I – EJB 3.1 Embeddable API
One of the most common requests we hear from Enterprise JavaBeans developers is for improved unit/integration testing support. EJB 3.1 Specification introduced the EJB 3.1 Embeddable ...

