I use RxJava a lot nowadays — back in the day before I joined Netflix I was struggling with it a bit and mostly watched from the sideline but nowadays I find myself pulling in that dependency in a lot of the Java code I’m writing. And I also use the Spock framework a lot […]
Posts Tagged: unit test
Anti-pattern for testing RxJava code
This is an obvious one but I find myself so often using it and every single time it means I have to spend extra time debugging my test / code until I realize that I’ve fallen for the same mistake again. I’m using RxJava here and using Groovy and Spock framework for testing — and […]
Disable PMD Plugin to Run for Test Sources
I use PMD in my Gradle builds quite a bit. (Maybe a bit more nowadays that the FindBugs peeps seem to be struggling with that project — see this email from Andrey on this: https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2016-November/004321.html). The issue I had with it is that there is no way to quickly turn off their checks for the src/test/… […]
Why You Should Use Default Methods in Java 8 Interfaces
With Java 8, Oracle introduced the concept of “default methods” in interfaces (and if you really haven’t heard of this — wtf?? — you can read more here about it: https://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html). This argue some is a step towards multiple inheritance and as such should be banished from the oh, so pure! Java language. Others point out […]
Odd Behaviour in Groovy when Comparing Maps
I came across this the other day and I ended up spending quite some time on it pulling my hair and I still couldn’t explain it in the end so I thought I’d post here to see if anyone can shed some light into it. In brief, it’s about Groovy’s (otherwise awesome!) feature of comparing […]
Cobertura Issue with Ignoring Annotated Methods
I’ve decided to plug in Cobertura in (some) of my projects to have an idea on the unit test/code coverage going on. I use Gradle, so I started looking at the Cobertura Gradle plugin. It turns out it’s pretty good — and offers a lot of the functionality that I needed. However, I came across […]
Storing Lists Using Evernote — via API
I’ve been playing for a while with Evernote and their API, which I find rather simple and effective (well done, guys!) — and as such on a few pet projects I have started considering moving the storage to Evernote itself. The beauty of using Evernote is that the storage is already structured for you in […]
Application Monitoring and Management using Sun’s JMX/HTML Interface
This is something I wanted to write about a while back – while there are articles on the net about using JMX in a Java application to keep an eye on how it ticks, or manage its running cycle, I think there is still a large number of users out there who are somewhat reluctant […]
RMISockFactory — New Open Source Project Started on SourceForge
I thought I’d post this on my blog as well since this seems to get a lot of attention nowadays (it certainly seems to get a lot of visitors!). I just started a new open-source project on SourceForge.net — I know you github fans will jump at my throat for using sf.net and not github, […]
The joys of unit tests
I’m sure as a developer you’ve all heard of unit tests and best practices which preach to unit test your code in the finest details to ensure stability of the platform you are building. While my post does refer to Java (due to my recent experience) I am convinced that this can be applied to […]