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</>↗
JUnit07 Jul 2026

How do I use assertions in JUnit?

In JUnit, assertions are used to verify that your code produces the expected result. If an assertion fails, the test fails. JUnit 5 assertions are provided by the org.junit.jupiter.api.Assertions class. Basic Example import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; class CalculatorTest { @Test void testAddition() { int result = 2 + 3; assertEquals(5, result); } } In […]

Wayan · 5 min read
JUNIT / NOTES</>↗
JUnit07 Jul 2026

How do I use @Test in JUnit?

Using @Test in JUnit In JUnit, @Test is an annotation that marks a method as a test method. When you run your tests, JUnit looks for methods annotated with @Test and executes them automatically. 1. Add the Correct Import For JUnit 5, use: import org.junit.jupiter.api.Test; You will usually also import assertions such as: import static […]

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

How do I understand the basic structure of a JUnit test class?

A basic JUnit test class is just a Java class that contains one or more test methods. Each test method checks whether a small piece of code behaves the way you expect. Here is a simple JUnit 5 example: import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class CalculatorTest { @Test void shouldAddTwoNumbers() { int result = 2 […]

Wayan · 4 min read
GRADLE / NOTES</>↗
Gradle07 Jul 2026

How do I add JUnit to a Gradle project?

To add JUnit to a Gradle project, add the JUnit dependency to your build.gradle or build.gradle.kts file and configure Gradle to use the JUnit Platform. If you use Groovy Gradle: build.gradle For JUnit 5, add: plugins { id 'java' } repositories { mavenCentral() } dependencies { testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' } test { useJUnitPlatform() } If you […]

Wayan · 1 min read
JUNIT / NOTES</>↗
JUnit07 Jul 2026

How do I add JUnit to a Maven project?

To add JUnit to a Maven project, you add the JUnit dependency to your project’s pom.xml, create test classes under src/test/java, and run the tests with Maven. 1. Add JUnit to pom.xml For modern Java projects, use JUnit 5. <dependencies> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <version>5.13.4</version> <scope>test</scope> </dependency> </dependencies> If your pom.xml already has a <dependencies> section, […]

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

How do I start unit testing in Java with JUnit?

Unit testing in Java means testing small pieces of code — usually one method or one class — in isolation. The most common testing framework for modern Java projects is JUnit 5, also known as JUnit Jupiter. This guide shows the basic steps to start writing unit tests with JUnit. 1. Add JUnit to Your […]

Wayan · 5 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.