Justify [Java EE]


[This page intended for Software Engineers; a less technical perspective may be viewed as JUST.]

PED Central is the home for the open-source “Justify” suite of software engineering modules. Justify seeks API alignment between Java 1.8+ application code and JUnit 5 test code.

Justify test life-cycle annotations simplify configuration when using “real” (functionally equivalent) services running within the JUnit JVM. Speedy execution time minimizes the need for extensive mock testing.

@JstConfigureTestJPA(configureTestJpaPO = ConfigurePO.class)
public class CascadeTest {

Powerful technology-specific assertions compliment specific Java technologies such as JPA and REST. For example, these assertions can verify difficult to isolate declarative behaviors included in Java source code. This snippet contains cascade rules for a JPA @Entity named “BookingDE”:

@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "NOTE_UUID",
            referencedColumnName = "NOTE_UUID")
private NoteDE note;

@OneToOne(cascade = { CascadeType.MERGE,
                      CascadeType.PERSIST })
@JoinColumn(name = "CUSTOMER_UUID",
            referencedColumnName = "CUSTOMER_UUID")
private CustomerDE customer;

These declarative cascade rules are certainly testable with custom code for each @Entity. However, boiler-plate (duplicate) test code can be reduced with a fluent Parameter Object approach similar to the following:

@Test //JUnit 5
public void testCascadeTypesForBooking_happyPath() {

  final JstAssertCascadePO assertCascadePO = JstAssertCascadePO


Justify source maximizes expressiveness (readability) by using the PED Unified Pattern Language. Enough chatter, let’s get coding!