Categories
Java

Generate and sign messages with RSA in Java

RSA stands for Rivest Shamir Adleman. It is one of the oldest yet most widely used. RSA is a public-key cryptosystem that is suitable for transmitting data securely. In this article, we cover how to generate and sign messages with RSA in Java. How RSA works When generating an RSA, a key pair is generated, […]

Categories
Java

Assert exceptions in AssertJ

Besides JUnit, AssertJ is another popular testing framework for Java that provides a fluent API for writing clear and concise test assertions. It improves the readability of test code and provides comprehensive support for Java objects and collections. One of the areas in which AssertJ shines is the exception assertion. In this article, we cover […]

Categories
Java

Mockito return based on the input parameter

Mockito, the defacto mocking library in the Java world that is widely adopted. It is used one way or another by almost any Java project. Mockito is known for its versatility which offers powerful features for dynamic testing scenarios. In this article, we discuss how to return a result of a mock object based on […]

Categories
Java

Pass null values in JUnit 5 @CsvSource

JUnit 5 @CsvSource allows writing parameterized tests without creating a CSV file or writing a method to feed data. However, handling nulls is not provided out of the box and requires a bit of configuration. In this article, we cover how to pass null values in JUnit 5 @CsvSource annotation. Let’s start by writing a […]

Categories
Kubernetes

How to resolve CreateContainerConfigError in Kubernetes

Kubernetes is the defacto container orchestration for deploying microservices in 2024. However, still, troubleshooting is not as easy as sshing to a machine and getting the output logs. In this article, we focus on how to resolve CreateContainerConfigError in Kubernetes. What is CreateContainerConfigError The error occurs when Kubernetes cannot create a configuration because there’s a […]

Categories
Kubernetes

Kubernetes resource allocation explained

Understanding Kubernetes resource allocation is crucial for optimizing performance and ensuring efficient utilization of resources within your cluster. In this article, we’ll delve deeper into CPU and memory allocation in Kubernetes deployments, providing clarity and examples to help you navigate this aspect of Kubernetes management. CPU allocation When defining resource requirements for a Kubernetes deployment, […]

Exit mobile version