Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
and many more ....
I agree to the Terms and Privacy Policy

Better integration tests with WireMock

spring-interview-questions-answers

No matter if you follow the classical test pyramid or one of the newer approaches like the Testing Honeycomb you should start writing integration tests at some point during development.There are different types of integration tests you can write. Starting with persistence tests, you can check the interaction between your components or you can simulate calling external services. This article ...

Read More »

How Much Cohesion Is Enough?

Which one is better: books.del(42) or books.book(42).del()? I do both and I rarely can tell which one is better. The first option is shorter, while the second one is more object-oriented. The first option is more difficult to extend, while the second one is more verbose and requires more lines of code, which means a higher chance of making mistakes. ...

Read More »

First Past the Post

Often, we write code to work out the first answer of a bunch of available ones. Let’s look at that in Java. 01 02 03 04 05 06 07 08 09 10 11 12 public Widget getAppropriateWidget(CustomerRequest request) {     if (shelfstock.contains(request.getBarcode()) {         return new ShelfWidget();     }     if (backroomStock.contains(request.getBarcode()) {         return new BackroomWidget();     }     if (supplier.contains(request.getEan()) {         return new SupplierWidget();     } ...

Read More »

Build a Simple CRUD App with Java and JSF

java-interview-questions-answers

Easily deploy your app with Okta’s identity management platform Use Okta’s API to authenticate, manage, and secure users in any app within minutes. Try Okta today. JavaServer Faces (JSF) is a Java framework for building Web applications, centered on components as the building blocks for the user interface. JSF benefits from a rich ecosystem of tools and vendors, as well ...

Read More »

[MEGA DEAL] Oracle Java Certification Exam Preparation Courses + Tests Training Bundle (92%)

Become a Certified Programmer with an Oracle Java Certification & Take a Step Ahead Toward a Brighter Development Career Hey fellow geeks, This week, on our JCG Deals store, we have another extreme offer. We are offering a massive 92% off on Oracle Java Certification Exam Preparation Courses + Tests Training Bundle. Get it now with only $29,99, instead of ...

Read More »

A Surprising Injection

So, I owe Jim an apology. He’d written a working mockito and JUnit test, and I told him in review that I didn’t think it did what he expected it to. While I was wrong, this scenario reads like a bug to me. Call it desirable unexpected side effects. Imagine you have the following two classes: 01 02 03 04 ...

Read More »

Fuzzy Assertions

As discussed in other Test Smells, like Trail by Competitive Calculation, and It Passed Yesterday, it’s very easy to create obscure assertions that are either unreliable or don’t prove a huge amount. While there are often good “bad reasons” for why we cannot write straightforward assertions, recognising when you are not writing one, and doing the best job possible to ...

Read More »

First-Class Procedure Type System for Composition

This is the first article in a series looking at the Inversion of Coupling Control type system for composition.  The series will demonstrate how the resulting type system allows for easy composition.  This avoids much of the complexity of Functional / Object-Oriented composition.  The resulting type system and it’s resulting composition is simple enough even for junior developers to comprehend. ...

Read More »