Learn about best practices for unit testing in Java.
Also find me here:
Baeldung Author
Anshul Bansal
I am a full-stack JEE developer with 8 years of experience. Seasoned in technologies like Grails & Groovy, Spring, and Hibernate with various domains. You can discover my technical content here at Baeldung or on https://dev.to/smartyansh.
Here's what I've written (so far):
Baeldung on Java
- All
- Programming (14)
- Java (13)
- Persistence (5)
- Java Concurrency (3)
- JVM (3)
- Testing (2)
- Spring Security (2)
- NoSQL (2)
- Java Collections (2)
- DevOps (2)
- Web Services (1)
- Spring Data (1)
- Spring (1)
- Security (1)
- REST (1)
- IDE (1)
- Architecture (1)
REST vs. gRPC
Filed under REST
Compare two architectural styles for web APIs
Kubernetes with kind
Filed under DevOps
Primarily a testing tool for Kubernetes, kind is also handy for local development and CI
Capturing Image From Webcam in Java
Filed under Java
Explore a few Java libraries that allow us to capture images by accessing the webcam
JVM Parameters InitialRAMPercentage, MinRAMPercentage, and MaxRAMPercentage
Filed under JVM
Learn about JVM parameters InitialRAMPercentage, MinRAMPercentage, and MaxRAMPercentage for setting the RAM percentages that the JVM will use for the heap
Mapping PostgreSQL Array With Hibernate
Filed under Persistence
Explore a few ways to map the PostgreSQL array with Hibernate
JVM Storage for Static Members
Filed under JVM
Learn about JVM storage for the static methods and members
Java NIO DatagramChannel
Filed under Java
Learn about Java NIO’s DatagramChannel class that allows the creation of a datagram channel to send/receive UDP packets
Returning Stream vs. Collection
Filed under Java Collections
Explore Java Streams and Collections and discuss various scenarios that suit their respective uses as return values
A Guide to SAML with Spring Security
Filed under Spring Security
Explore Spring Security SAML with Okta as an identity provider
Bad Practices With Synchronization
Filed under Java Concurrency
Learn about a few bad practices associated with synchronization and the better approaches for each use case
Binary Semaphore vs Reentrant Lock
Filed under Java Concurrency
Learn the differences between binary semaphores and reentrant locks and see which one is best suited in common situations
Redis vs MongoDB
Filed under NoSQL, Persistence
Learn some features offered by Redis and MongoDB and see when to use Redis or MongoDB by comparing them against each other
Distributed Performance Testing with JMeter
Filed under Testing
A quick and practical guide to distributed performance testing with JMeter.
Performing Calculations in the Database vs. the Application
Filed under Persistence, Programming
Explore the advantages and disadvantages of performing calculations in the database and application code
DAO vs Repository Patterns
Filed under Architecture, Persistence
Understand the difference between the DAO and Repository patterns with a Java example.
A Guide to async-profiler
Explore async-profiler along with various profiling techniques it offers
Version Comparison in Java
Filed under Programming
Explore a few ways to compare version strings in Java through various libraries
View Bytecode of a Class File in Java
Filed under JVM
Explore ways to view the bytecode of a class file in Java
Spring Security With Auth0
Learn how to integration Auth0 with Spring Security
Spring Security With Okta
Filed under Spring Security
Explore Spring Security with Okta along with a minimalistic setup of the Okta developer account
Memcached vs Redis
Filed under NoSQL, Persistence
Learn about the similarities and differences between Memcached and Redis.
HTTP/2 in Jetty
Filed under DevOps
Learn how to configure a Jetty server-side application with HTTP/2 Push support.
Optical Character Recognition with Tesseract
Filed under Java, Programming
In this tutorial, we’ll explore Tesseract, an optical character recognition (OCR) engine, with a few examples of image-to-text processing.
Introduction to Takes
Filed under Java
Learn about Takes – an immutable and object-oriented web framework for Java
Introduction to the jcabi-aspects AOP Annotations Library
Filed under Java, Programming
Learn about the jcabi-aspects Java library, a collection of handy annotations that modify the behavior of Java application using aspect-oriented programming
Introduction to Open Liberty
Filed under Java, Programming
Learn how to use the Open Liberty framework to create and consume a RESTful web service
Asynchronous Programming in Java
Filed under Java Concurrency
Learn about a few ways to achieve asynchronous programming in Java
Introduction to Ninja Framework
Filed under Java, Programming
Learn about the Ninja web framework and the basic features that it provides using a simple web application
Intro to Apache Tapestry
Filed under Java
Learn about the Apache Tapestry web framework and create a simple web application using the basic features that it provides
Intro to Spring Data Geode
Filed under Spring Data
Learn how to use Spring Data Geode for the configuration and development of an Apache Geode Java client application
Categories in Groovy
Filed under Programming
Learn about the Groovy categories metaprogramming feature that can enable additional features on classes
A Quick Guide to Working with Web Services in Groovy
Filed under Web Services
Learn how to work with Web Services in Groovy.
An Intro to the Java Debug Interface (JDI)
Filed under Java
A quick and practical overview of Java Debug Interface.
Metaprogramming in Groovy
Filed under Programming
Explore the concept of runtime and compile-time metaprogramming in Groovy
Lossy Conversion in Java
Filed under Java
Learn about lossy conversion in Java and some handy conversion techniques to avoid this error
Ratpack with Groovy
Filed under Programming
Ratpack is a set of lightweight Java libraries for building scalable non-blocking HTTP applications. We explore building a Ratpack service in Groovy.
Template Engines in Groovy
Filed under Programming
Learn how to handle dynamic text using Groovy template engines
Groovy def Keyword
Filed under Programming
Learn about the def keyword in Groovy
Copying a HashMap in Java
Filed under Java, Java Collections
Learn various techniques for making shallow and deep copies of Java’s HashMap
Closures in Groovy
Filed under Programming
Explore the concept of closures in Groovy, a key feature of this dynamic and powerful JVM language.
An Introduction to Traits in Groovy
Filed under Programming
Learn how to create traits in Groovy and explore some of their useful features.
Reading a File in Groovy
Filed under Programming
Learn various ways to read text and binary files in Groovy
Convert a Float to a Byte Array in Java
Filed under Java
Learn how to convert between a Java float value and a byte array
Baeldung on Kotlin
- All
- Testing (1)
- Kotlin-Java Interop (1)
- Kotlin Web (1)
- Kotlin (1)
Guide to Spring Boot Testing with Kotlin
Filed under Kotlin Web, Testing
Explore a few unit and integration testing techniques for the Spring Boot app with Kotlin.
Kotlin Interview Questions
Filed under Kotlin
Learn a few typical interview questions categorized into beginner and advanced levels
Java vs. Kotlin
Filed under Kotlin-Java Interop
Learn several key differences between Java and Kotlin, the two most popular languages for the JVM.