So you have heard about continuous delivery and continuous deployment and you are eager to try, but your manager is afraid that you will lose traceability of the project. How can frequent updates of your binaries be tracked in a rapidly progressive environment, where every commit is a potential release? Artifact Version vs. Commit The [...]
Continuous Deployment, Versioning and Git
April 7th, 2012 by Mattias Severson — Java, Tips & Tricks
Tags: continuous delivery, continuous deployment, git, Java, maven, spring, version control
Mockito and Dependency Injection
February 25th, 2012 by Mattias Severson — Java, Testing
When writing your Java unit test you will soon need a way to handle the dependencies of your classes under test. Mockito have some nice features that simplify the creation and usage of mock objects that have improved gradually during the last couple of years. Class under test Imagine that you write an Example class [...]
Tags: dependency injection, Java, java ee, junit, mocking, mockito, spring
Spring Integration Tests, Part II, Using Mock Objects
December 12th, 2011 by Mattias Severson — Java, Testing
In the previous post, I wrote how you can use Spring’s FactoryBean to facilitate the creation of mock objects for Spring integration tests. Now, it is time to use the EasyMockFactoryBean (in this post EasyMock has been used for creating mock objects, but a similar approach applies to Mockito as well. Start by looking at [...]
Tags: easymock, Java, mock, mockito, spring
Spring Integration Tests, Part I, Creating Mock Objects
November 30th, 2011 by Mattias Severson — Java, Testing
When writing integration tests with Spring, it can sometimes be convenient to mock one or more of Spring bean dependencies. However, during some circumstances strange things may happen… (In this post, Mockito has been used for creating mock objects, but the same problem applies to EasyMock as well. You can find the corresponding files if [...]
Tags: easymock, factory-method, factorybean, Java, mock, mockito, spring
IntelliJ IDEA performance improvement
September 26th, 2011 by Mattias Severson — Java, Tips & Tricks
Working as a consultant, it is not unusual that I am referred to customer specific software environment with regard to computers, operating systems, networks and other configurations. However, since I work with Java, most tools are available online and they can easily be downloaded and installed on different platforms. IntelliJ IDEA is no exception, but [...]
Tags: home directory, idea, intellij, performance, tools
Dynamic FTP Client using Apache Camel and Spring
August 12th, 2010 by Mattias Severson — Java
I was recently asked to develop an FTP client that could transmit files to various FTP servers as a part of a delivery system in a Java enterprise application. The requirements dictated a flexible implementation: Three different FTP protocols should be supported, namely FTP, FTPS and SFTP It should be possible to transmit different files [...]
Tags: apache, camel, FTP, integration, Java, spring
Architectural Enforcement with Aid of AspectJ
March 28th, 2010 by Mattias Severson — Architecture, Java
After working some time within the software industry, you get a feeling for good software architecture. Or, to be more honest, you get a creeping feeling when the architecture is really bad. That is when the code is tangled like a Gordian knot. After some futile refactoring attempts, you consult the software architect at your [...]
Tags: aop, aspectj, Java, maven
Getting started with JavaME jUnit testing
March 22nd, 2009 by Mattias Severson — Embedded, Java, Testing
Introduction Unit testing is a very powerful tool that should be included in every developer’s toolbox. Unfortunately, this has not always been the case, especially not among MIDlet developers. One reason is that JavaME projects usually are small (compared to Java SE projects), which implies that manual testing could be enough. However, as soon as [...]
Tags: java me, junit, mock, powermock
How to mock MIDP RecordStore
March 22nd, 2009 by Mattias Severson — Embedded, Java, Testing
The challenge PowerMock is a mocking framework that claims to have almost supernatural powers. According to its documentation it is able to mock both static and private methods, final classes, and other nasty things that would be insurmountable obstacles for other mock frameworks. As a result, it has been stated that it should be able [...]
Tags: java me, junit, mock, powermock
Øredev 2007
February 1st, 2008 by Stefan Li , Mattias Severson and Jakob Klamra — Events
As most of you know Jayway is one of the organizers of Øredev. Knowing that, and knowing how much we love our own conference, you might not trust our judgment in this review. We beg to differ, and ensure you that Øredev is just as enjoyable as we describe it in this article. The Conference [...]
Tags: conference, jayview, oredev
