In this first installment of Testing with state using GraphWalker, we’ll look at integration testing the persistence layer of a Spring application. So, our tests will target the database and the data repositories. Statefulness The database itself is inherently stateful. As a result, if we connect a data repository to an actual database, it will also show stateful behavior. For … Lees verder Testing with state using GraphWalker | Part 1 – Persistence
This post will demonstrate generating test data using junit-quickcheck. It will focus on practical examples, rather than the theory behind property based testing.
This is part 7 of the series called “Functional Java by Example”. The example I’m evolving in each part of the series is some kind of “feed handler” which processes documents. We’ve already dealt with exceptional situations before, but we’re going to take care of them, more ehm,…functionally — as data.
When I explained a piece of code to a colleague during a code review, I realized I had inadvertently implemented a readers-writer lock. So, I threw the code out, replacing it by the ReadWriteLock from java. This article is about that thrown out code. I updated the method names and comments to reflect the readers-writer lock as opposed to the … Lees verder Readers-writer lock using java 5’s condition variables
This is part 6 of the series called “Functional Java by Example”. The example I’m evolving in each part of the series is some kind of “feed handler” which processes documents. In previous part we tried to make our functions as pure possible by moving as much of the side-effects, such as IO, to the outside of the system. Now … Lees verder Functional Java by Example | Part 6 – Functions as Parameters
This is part 5 of the series called “Functional Java by Example”. In previous part we stopped mutating our documents and returned copies of the data. Now, we need to move some I/O away.
This is part 4 of the series called “Functional Java by Example”. In previous part we talked a bit about side effects and I’d like to elaborate a bit more about how we can prevent having our data manipulated in unexpected ways by introducing immutability into our code.
Today is my birthday. Yes, it is actually my birthday: May the 15th. So, I thought it would be fun to write about a little algorithmic puzzle I’ve been pondering about. You see, each year we grow older; as a person, but also collectively as an organisation, a group, a community. That’s a lot of combined knowledge I reckon. 🙂 … Lees verder Creative Ways of Finding a Birthday: When Are We 250 Years?
Kubernetes & Logging When you are running services in a Kubernetes cluster they are probably writing log statements that contain all sorts of useful information you need to have look at now and then. Being the good developer you behaved and made sure all logging statements are written to the console. This gives you the possibility to use kubectl logs … Lees verder Kubernetes & Logging
This is part 3 of the series called “Functional Java by Example” and is a cross-post from my personal blog. The example I’m evolving in each part of the series is some kind of “feed handler” which processes documents. In previous parts I started with some original code and applied some refactorings to describe “what” instead of “how”. In order … Lees verder Functional Java by Example | Part 3 – Don’t Use Exceptions to Control Flow