SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

JUNIT / NOTES</>↗
JUnit13 Jul 2026

How do I understand JUnit Platform, Jupiter, and Vintage?

If you are learning modern Java testing, the words JUnit Platform, JUnit Jupiter, and JUnit Vintage can be confusing at first. They sound like three different testing frameworks, but they are really three parts of the JUnit 5 ecosystem. The short version is: JUnit Platform runs tests. JUnit Jupiter is the modern JUnit 5 programming […]

Wayan · 10 min read
JUNIT / NOTES</>↗
JUnit13 Jul 2026

How do I test Collections, Lists, Maps, and Sets in JUnit?

Testing Collections in JUnit In JUnit, you usually test collections with assertions such as: assertEquals assertTrue assertFalse assertIterableEquals assertArrayEquals assertThrows If you are using JUnit 5, import assertions from: import static org.junit.jupiter.api.Assertions.*; 1. Testing a List Use assertEquals when order matters. import org.junit.jupiter.api.Test; import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.j...

Wayan · 6 min read
JUNIT / NOTES</>↗
JUnit13 Jul 2026

How do I compare objects in JUnit tests?

In JUnit tests, you usually compare objects with assertions, not with ==. The most common choices are: assertEquals(expected, actual) — compares objects using their equals() method. assertSame(expected, actual) — checks whether both references point to the same object. AssertJ’s assertThat(actual).isEqualTo(expected) — a more fluent alternative. Field-by-field assertions — useful when you only care about some […]

Wayan · 4 min read
JUNIT / NOTES</>↗
JUnit13 Jul 2026

How do I use AssertJ with JUnit for better assertions?

You can use AssertJ with JUnit to write more readable, fluent assertions than standard JUnit assertions. 1. Add AssertJ Dependency If you use Maven: <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>3.26.3</version> <scope>test</scope> </dependency> If you use Gradle: testImplementation("org.assertj:assertj-core:3.26.3") 2. Use AssertJ in a JUnit Test Import assertThat statically: import org.junit.jupiter.api.Test; import static org.as...

Wayan · 3 min read
JUNIT / NOTES</>↗
JUnit13 Jul 2026

How do I test repository-like classes without a real database?

You can test repository-like classes without a real database by replacing the database dependency with a fake, mock, or in-memory implementation, depending on what you want to verify. 1. Use mocks for unit tests If your class depends on a repository interface, mock it and verify behavior without touching a database. Example with JUnit 5 […]

Wayan · 4 min read
JUNIT / NOTES</>↗
JUnit13 Jul 2026

How do I test service classes with JUnit and Mockito?

Testing Service Classes with JUnit and Mockito Service classes are usually where your business logic lives. They often depend on repositories, clients, mappers, validators, or other services. When unit testing a service, the goal is usually: test the service logic itself mock external dependencies avoid starting the Spring container unless necessary verify returned values, exceptions, […]

Wayan · 8 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.