SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

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
SPRING BOOT / NOTES</>↗
Spring Boot07 Jul 2026

How do I use profiles for different Spring environments?

Spring profiles allow you to run the same application with different configurations depending on the environment, such as development, testing, staging, or production. For example, your development environment may use an in-memory database, while production uses MySQL or PostgreSQL. 1. What Is a Spring Profile? A profile is a named set of configuration settings that […]

Wayan · 7 min read
SPRING MVC / NOTES</>↗
Spring MVC06 Jul 2026

How Do I Build REST APIs with Spring MVC?

Building REST APIs with Spring MVC In Spring MVC, you build REST APIs by defining controller classes that map HTTP requests to Java methods. In modern Spring Boot applications, this is usually done with @RestController. A typical REST API is organized like this: HTTP Request ↓ Controller ↓ Service ↓ Repository ↓ Database Each layer […]

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.