Entries from May 2007 ↓

Mocking Classes

Ulrik Sandberg

Mocking a class rather than an interface might present some interesting obstacles. Perhaps you have ran into the dreaded: Unexpected method call toString(): toString(): expected: 0, actual: 1 You think nothing of it and happily add an expectation for toString. Then you get: Unexpected method call toString(): toString(): expected: 1, actual: 2 The reason is [...]

Tags: ,

Sweden Spring UG Birth of a new UG

Ulrik Sandberg

Once in a while we see a new user group being born. One of those is close to many Java programmers’ hearts – the Sweden Spring User Group. We turned to Ulrik Sandberg, one of the founders of the group. Tell us how you got started with the Sweden Spring User Group. The Sweden Spring [...]

Tags: ,

News On Concurrency

Jacob Mattsson

Prior to Java 5, most people associated concurrency in Java with the Thread and Runnable concepts. That has all changed now! We now have a compelling high-level API at our hands, including a lot of new concurrent data structures in the Collections Framework and a brand new task Executor framework. In this article, you’ll get [...]

Tags: ,

JavaOne 2007 – What’s left?

Peter Neubauer

Having been at this years JavaOne, the event was impressive as always, but left me with a feeling of being mostly a marketing display for Sun and its partners, not for Java as a whole. I even had the feeling that within Java standard and enterprise computing, things are moving at the pace of evolution, [...]

Tags: ,

Mocking Static Methods

Jan Kronquist

Mock objects is a very useful technique for unit testing as it allows you to focus your testing efforts on the class being tested instead of on its collaborators. Unfortunately, not everything is an object and therefore you cannot always use mock objects. This article will show how mocking can be generalized to include more [...]

Tags: , ,

OSGi – not just a four letter word

You may have heard the word OSGi recently: perhaps on a technical blog, or in a passing conversation between developers. In the very near future words like OSGi, bundles, OSGi services and the service registry will be essential concepts that every web application developer and architect should know and understand. This article introduces OSGi, and [...]

Tags: , ,