REST endpoint stub in Java

Making a REST server Let me remind you that earlier we talked about setting up a REST server for unit tests in JUnit. We will also be using the WireMock tool today. Information about adding WireMock to the project can be found in the previous article. Configuring server parameters For HTTP: For HTTPS: To use […]

READ MORE

REST endpoint stub in JUnit

Suppose you want to test method X. It requests data from a specific endpoint Y. In this article, we’ll talk about three things: how to start a REST server within a unit test; how to set up data transmission on Y; how to check the number of requests received on Y. For information on how […]

READ MORE

SSL / TLS setup for ZooKeeper

We have a ZooKeeper server and a java client application that connects to it. SSL has appeared in ZooKeeper since version 3.5.: https://issues.apache.org/jira/browse/ZOOKEEPER-2125 Server Tuning There are several types of ZooKeeper server distribution. We’ll cover the standalone version as well as the Apache Kafka version. We need a configured server for start. The setup process […]

READ MORE

Cacerts file location

Linux & MacOS The cacerts file is a collection of trusted certificate authority (CA) certificates. It is located in the Java Runtime Environment distribution under the path: The extension is not specified in the file name, but the file is of JKS type. For this reason, in some cases, an explicit indication of the file type is […]

READ MORE

SSL / TLS certificates generation

We have a server and a client. Connecting via SSL / TLS protocols, in addition to encrypting the transmitted data, implies the client’s confidence that he is connected to the server he wanted. To do this, the server needs to go through the authentication procedure (show the passport). This mechanism is called one-way SSL. There […]

READ MORE