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

How do I use @ValueSource in JUnit parameterized tests?

In JUnit 5, @ValueSource is used with @ParameterizedTest to run the same test multiple times with different simple literal values. Basic example import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import static org.junit.jupiter.api.Assertions.assertTrue; class StringTest { @ParameterizedTest @ValueSource(strings = {"racecar", "radar", "level"}) void palindromeWordsHaveLengthGreaterThanZero(String word) { assertTrue(word.le...

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

How do I write parameterized tests in JUnit?

In JUnit 5, parameterized tests let you run the same test multiple times with different input values. You use: @ParameterizedTest instead of: @Test Then you provide test data using a source annotation such as @ValueSource, @CsvSource, @MethodSource, or @EnumSource. Basic Example with @ValueSource import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; import static org.junit.jupiter.api.Assertions.assertTrue; class NumberTest {...

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

How do I decide what should and should not be unit tested?

Short answer Unit test behavior that you own and that can break, especially logic with branches, rules, edge cases, and important failure paths. Do not unit test code that merely repeats the framework, language, or library behavior unless you add meaningful logic around it. Good candidates for unit tests 1. Business rules If the code […]

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

How do I avoid common mistakes when writing JUnit tests?

Writing JUnit tests is not only about checking whether the code works. Good tests should be clear, reliable, independent, and easy to maintain. Here are common mistakes beginners often make when writing JUnit tests, along with better ways to avoid them. 1. Do Not Let Tests Depend on Each Other Each test should be able […]

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

How do I follow the Arrange-Act-Assert pattern in unit tests?

The Arrange-Act-Assert pattern is a simple way to organize unit tests so they are easy to read and understand. A unit test usually answers three questions: Arrange: What data or objects do I need? Act: What behavior am I testing? Assert: What result do I expect? Basic Structure @Test void methodName_expectedBehavior() { // Arrange // […]

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

How do I write clean and readable JUnit tests?

Clean JUnit tests should be easy to understand, focused on one behavior, and safe to change. A good test should tell you: What scenario is being tested What action happens What result is expected Most Java projects today should use JUnit 5, from the org.junit.jupiter package. 1. Use Clear Test Names A test name should […]

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.