Testing asynchronous operations in Java can be challenging, especially when working with microservices, reactive applications, and event-driven architectures where you need to wait for conditions to become true without using unreliable Thread.sleep() calls. Awaitility is a lightweight Java library that simplifies waiting in your tests, allowing you to write clear, fluent, and robust asynchronous tests. In this updated guide, you will learn how to use Awaitility for testing Java, Spring Boot, Quarkus, and Jakarta EE applications, with practical examples aligned with modern testing practices for cloud-native environments and CI/CD pipelines.
Various Stuff
JUnit Testing Best Practices: Verifying No Exceptions in Your Java Code
Introduction When writing tests in Java, it’s important to verify that a method or code block behaves as expected. One of the most common things to check is whether an exception is thrown during the execution of a test. However, sometimes we also want to verify that no exception is thrown. This can be particularly … Read more
Getting started with langchain4j and Llama Model
This article is a step-by-step guide to introduce you to Large Language Models (LLMs) in Java applications using LangChain4j. We will learn how to install the latest version (June 2025) of CodeLlama on a local machine and how to connect and use it from a Java application.
Using AI in Java applications with WildFly
This guide shows how to integrate a lightweight AI assistant into a Java application running on WildFly. We’ll use the LangChain4j library to interact with a language model (like LLaMA via Ollama), and expose it through a simple HTML interface using Jakarta REST and CDI. No hype, no magic—just a working example.
Getting Started with DeepSeek AI and Java
DeepSeek AI is a powerful AI model that can be integrated into Java applications using LangChain4j. This tutorial will guide you through setting up a simple chatbot in Java using DeepSeek AI and LangChain4j, leveraging the Ollama API for local execution. DeepSeek AI Model Variants and Differences Before we dive into an example on how … Read more
Getting Started with Quarkus and Langchain4j
Quarkus is a lightweight, cloud-native Java framework optimized for GraalVM and Kubernetes. When combined with Langchain4j, it allows developers to integrate AI capabilities into Java applications efficiently. In this tutorial, we’ll explore how to use Langchain4j with Ollama’s Llama model, creating a simple Command-line application.
Logging vs. Tracing vs. Metrics: Understanding the Differences
In the realm of software development and system monitoring, three crucial components play a pivotal role in ensuring the smooth operation and maintenance of applications: logging, tracing, and metrics. Each of these elements serves a unique purpose and provides distinct insights into the system’s behavior and performance. Understanding their differences and applications is essential for building robust and efficient monitoring and diagnostic systems.
Testing JPA with TestContainers
Testcontainers is an open-source Java library that simplifies integration testing by providing lightweight, disposable containers for database systems, message brokers, and other third-party services. In this article we will learn how to combine Testcontainer with a JPA/Hibernate Test case.
Using RAG with Langchain4j and Ollama3
Retrieval-Augmented Generation (RAG) is a framework that enhances the capabilities of generative language models by incorporating relevant information retrieved from a large corpus of documents. This combination helps improve the accuracy and relevance of the generated responses. In this article we will learn how to use RAG with Langchain4j.
Getting Started with Testcontainers for Java
Introduction In modern software development, it is crucial to write robust and reliable tests to ensure the quality of your applications. One essential aspect of testing is dealing with dependencies, such as databases or external services. Testcontainers is an excellent Java library that provides lightweight, disposable containers for running dependencies during tests. In this tutorial, … Read more