Tagged: java

0
3 Best Practices to Test a Code That Calls Static Methods

3 Best Practices to Test a Code That Calls Static Methods

If you’ve ever developed unit tests in a serious project, you should know how frustrating it is to test a code that calls static methods. Here I’ll try to summarize 3 best practices that I normally use to test such a code. When does a static method requires a special care in unit tests? Not all static...

0
JShell

A jshell script incorporating JDK 13 Text Block feature

In this post I’ll show you how I managed to develop my first bash script in Java using JShell which incorporates JDK Text Block feature to produce a new file. The script is used to process hundreds of JPA entity classes and produce a builder class for them in Groovy. The Story During recent refactorings in our...

0
Apache DeltaSpike Logo

Implementing Repositories in Java SE using DeltaSpike

Repositories are one of my favorite patterns to make an abstraction of the data layer of an application. You may have heard about it if you have ever read an article about Domain Driven Design. Hence in this post I consider you have the basic familiarity with it and will focus mostly on how to implement this...

0
JSON-B Logo

Getting started with JSON-B

Java API for JSON Binding or JSON-B is one of the newest APIs that’s going to be a part of Java EE 8 and has already passed the Public Review Ballot. As you may guess from its name, the JSON-B is trying to standardize the way Java objects would be serialized (presented) in JSON and defines a standard API...