Home » Author Archives: Rafal Borowiec

Author Archives: Rafal Borowiec

Software developer, Team Leader, Agile practitioner, occasional blogger, lecturer. Open Source enthusiast, quality oriented and open-minded.

Placeholders support in Value annotations in Spring


${...} placeholders in @Value annotation are used to access properties registered with @PropertySource. This is extremely useful with @Configuration beans in Spring applications, but not only. To be sure that this is possible, PropertySourcesPlaceholderConfigurer must be present in all application contexts that placeholders resolution is required. In this blog post you will learn how to configure placeholders resolution in Spring ...

Read More »

AssertJ’s SoftAssertions – do we need them?


One of the rules of writing good unit test is that it should fail for one reason, so unit test should test one logical concept. Sometime it is quite tough to have a single assertion per test. To follow the rule, we may have having multiple assertions per object in a single test. The problem with multiple assertions in a ...

Read More »

Parameterized integration tests with Spring JUnit Rules


Spring 4.2 comes with brand new JUnit rules: SpringClassRule and SpringMethodRule. The main advantage of using JUnit rules is to let developers get rid of SpringJUnit4ClassRunner and utilize different JUnit runners in Spring integration tests. I think the biggest opportunity with Spring JUnit Rules is the ease of creating parameterized integration tests. The code to be tested For the purpose ...

Read More »

Groovier Spring Boot Integration Testing


Recently I had a chance to use Groovy’s groovy.json.JsonSlurper in a soapUI REST project. The usage scenario in soapUI (in particular, soapUI Open Source) was very simple: in a Groovy assertion, load the content of a response into a variable and than verify it like this: import groovy.json.JsonSlurper; def slurper = new JsonSlurper() def result = slurper.parseText(messageExchange.responseContent) assert result.incidentType == ...

Read More »

JUnit: Testing Exceptions with Java 8 and AssertJ 3.0.0


AssertJ 3.0.0 release for Java 8 makes testing exceptions much easier than before. In one of my previous blog post I described how to utilize plain Java 8 to achieve this, but with AssertJ 3.0.0 much of the code I created may be removed. Warning: this blog post contains mostly the code examples.     SUT – System Under Test ...

Read More »

Jenkins HOW-TO: build a project from multiple (Git) repositories


Recently I have been working on a project that has two main modules: Backend and Frontend. The Backend is a Spring Boot application and the Frontend is an AngularJS 1.3 application. While preparing the build we are using Grunt for building AngularJS code and Gradle for building the Spring Boot application. Grunt is creating a JAR file containing all resources ...

Read More »

Spring Boot Integration Testing with Selenium


Web integration tests allow integration testing of Spring Boot application without any mocking. By using @WebIntegrationTest and @SpringApplicationConfiguration we can create tests that loads the application and listen on normal ports. This small addition to Spring Boot makes much easier to create integration tests with Selenium WebDriver. Test Dependencies The application that we will be testing is a simple Spring ...

Read More »

Quick Start: Spring Boot and WildfFly 8.2 on OpenShift


A really “Quick Start” with Spring Boot, WildFly and OpenShift as opposed to my last, more descriptive article. Prerequisite Before we can start building the application, we need to have an OpenShift free account and client tools installed. Step 1: Create WildFly application To create an application using client tools, type the following command: rhc create-app <app-name> jboss-wildfly-8 --scaling This ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.