Skip to content
Java & Software Architecture Knowledge Hub
/
Learning paths Glossary About GitHub
  • Learning Paths
    • Java Developer Fundamentals
    • Design Patterns
    • Spring Boot Developer
    • Software Architecture
    • Microservices Engineer
    • System Design Interview Preparation
  • Design Patterns
    • What Are Design Patterns?
    • SOLID Principles
    • OO design principles
    • GoF Overview
    • Creational Patterns
      • Abstract Factory
      • Factory Method
      • Builder
      • Prototype
      • Singleton
    • Structural Patterns
      • Adapter
      • Bridge
      • Composite
      • Decorator
      • Facade
      • Flyweight
      • Proxy
    • Behavioral Patterns
      • Chain of Responsibility
      • Command
      • Interpreter
      • Iterator
      • Mediator
      • Memento
      • Observer
      • State
      • Strategy
      • Template Method
      • Visitor
    • Compound patterns and MVC
  • Java
    • Java Fundamentals
      • Exceptions & try-with-resources
      • Generics & type erasure
      • Collections Framework
      • Records, sealed & patterns
      • Reflection & dynamic proxies
    • Advanced Java
      • Java Memory Model
      • Garbage collection
      • Lambdas & Streams
      • Concurrency API
      • Virtual threads
      • Module system (JPMS)
      • Designing concurrent objects
      • State-dependent actions
      • Concurrency design patterns
  • Spring
    • Spring Core
      • Dependency Injection
      • ApplicationContext & BeanFactory
      • Bean lifecycle & scopes
      • Configuration & scanning
      • SpEL
      • AOP & proxies
      • Application events
    • Spring Boot
      • Auto-configuration & conditions
      • Externalized configuration
      • Actuator & custom endpoints
    • Spring Web
      • Spring MVC architecture
      • REST design & error handling
      • WebFlux & Reactor
    • Spring Data and Persistence
      • Spring Data JPA & Hibernate
      • Mappings & fetching
      • JPQL & Criteria API
      • Transactions
      • Auditing & migrations
      • Caching & Redis
    • Spring Security
      • Security filter chain
      • OAuth2, OIDC & JWT
      • Method-level security
    • Production Spring Boot
      • Unit testing (JUnit, Mockito)
      • Integration testing
    • Patterns in Spring
  • Software Architecture
    • Introduction
  • Hexagonal Architecture
    • Layered vs Hexagonal
    • Spring Boot Implementation
  • Domain-Driven Design
    • DDD Fundamentals
    • Strategic DDD
      • Bounded Context
    • Tactical DDD
    • Advanced DDD
  • Microservices
    • Microservices Fundamentals
      • Microservices vs Modular Monolith
      • Service discovery
      • API gateway
      • Centralized configuration
    • Service Communication
      • Event-driven (Cloud Stream, Kafka, RabbitMQ)
    • Reliability Patterns
      • Circuit breakers (Resilience4j)
      • Idempotency
    • Data and Consistency
      • Saga pattern
      • Transactional outbox and inbox
      • CQRS and event sourcing
    • Observability and Operations
      • Observability (Micrometer, OTel)
    • Microservices Case Studies
  • System Design
    • Introduction
    • Diagram Building Blocks
    • System Design Building Blocks
      • Scaling to millions of users
      • Load balancing and proxies
      • Caching strategies
      • Consistent hashing
      • CAP and PACELC
      • Choosing a database
      • Unique ID generation
      • Queues and delivery semantics
      • Real-time communication
      • Deployment strategies
      • Security fundamentals
      • DNS and the request lifecycle
      • Probabilistic data structures
    • System Design Case Studies
      • Order Management System
      • URL Shortener
      • Rate Limiter
      • Payment System
      • Proximity Service
      • Chat System
      • News Feed
      • Notification Service
      • Video Streaming
      • Web Crawler
      • Search Autocomplete
      • Distributed Key-Value Store
      • Collaborative Editing
      • Stock Exchange
      • Ride Sharing
      • Metrics and Alerting
      • Flash Sale
      • File Storage and Sync
  • Data-Intensive Systems
    • Reliability, scalability, maintainability
    • Data models
    • Storage engines
    • Encoding and evolution
    • Replication
    • Partitioning (sharding)
    • Transactions and isolation
    • Distributed systems faults
    • Consistency and consensus
    • Batch processing
    • Stream processing
  • Comparisons
    • Adapter vs Decorator vs Proxy vs Facade
    • Factory Patterns Compared
    • Strategy vs State vs Template Method
    • Observer vs Mediator vs Event Bus
    • REST vs GraphQL vs gRPC vs messaging
  • Self Review
    • Quick check
    • Service review checklist
    • Quick reference
  1. Home
  2. Tags
  3. Testing

Tagged “Testing”

4 articles with this tag.

  • Dependency InjectionWhat dependency injection is, why constructor injection is the default, how a composition root works in plain Java, and what the Spring container automates — with a runnable before-and-after example and interview questions. Beginner · 11 min read
  • Spring Boot ImplementationA complete, tested order-management service in Spring Boot 4 and Java 21, built with ports and adapters: package structure, domain model, use cases, REST and JPA adapters, wiring, and tests that run without Spring or a database. Intermediate · 20 min read
  • Integration testingTesting Spring applications with real infrastructure: @SpringBootTest and web environments, test slices (@WebMvcTest, @DataJpaTest, @JsonTest, @RestClientTest), MockMvc and RestTestClient/WebTestClient, @MockitoBean, Testcontainers with @ServiceConnection, reusable containers and dev-time services, context caching, contract tests, and a practical test strategy. Intermediate · 4 min read
  • Unit testing (JUnit, Mockito)Fast, focused tests for Java and Spring code: the testing pyramid, JUnit Jupiter (JUnit 5 and 6) lifecycle, assertions with AssertJ, parameterized and nested tests, Mockito mocks, stubs, spies, verification and argument captors, BDD style, testing without Spring, test doubles vs fakes, and what makes a good unit test. Beginner · 5 min read

Java & Software Architecture Knowledge Hub

Understand the concepts. Explore the diagrams. Build better software.

  • About & conventions
  • All tags
  • RSS feed
  • Sitemap
  • Source on GitHub
  • Contribute

© 2026 Samir Kumar Sahoo. All rights reserved. All content on this site, including text, code examples, images, diagrams and interactive Archify diagrams, may not be copied, reproduced or redistributed without written permission. Java examples target Java 21 LTS.