Software projects need unit tests in order to ensure that each piece of code we add to the codebase functions as we expect. Mockito is a great tool that can help us mock the classes and objects that are used in the code piece we need to test.

To get started, we will consider a basic Java helper class below

public class MyHelper {public String methodOne() {
return "Method 1 called";
}
public String methodTwo() {
// sends an HTTP call using some HTTP client
return "response from HTTP call";
}
public void methodThree() {
methodOne();
methodTwo();
}
}


Using Java SDK of Okta can be a tricky thing. Mainly due to the lack of active community around it. So you might find yourselves digging through the library code to understand how to do certain actions. In this short blog, I will explain how we can call the set password using partial user update endpoint.

First we will see the corresponding REST API before diving into Java SDK. The following is the REST API endpoint for setting user password. HTTP method is POST

https://syscoconsumer.oktapreview.com/api/v1/users/{user_id}

The request body needs to be as follows

{
"credentials": {…


This demonstration used the following two Docker images,

  1. mssql-wso2si-demo — https://hub.docker.com/r/niruhan/mssql-wso2si-demo
  2. wso2si-demo — https://hub.docker.com/r/niruhan/wso2si-demo

Note: we will use the image name as the container name using the — name tag when starting the containers for simplicity.

The container contains a Microsoft SQL server with a table named already created. Change data capture is also enabled on this table.

The container contains WSO2 Streaming Integrator, Kafka Zookeeper, Kafka Server, Kafka Console Client, Kafka Console Producer, Prometheus, and Grafana servers pre-configured to minimize the effort required to follow this demonstration.

Table of Contents

  • Start the containers
  • Monitoring
  • Demo 1 — Receive and…

1. L’étudiant en médecin porté disparu depuis une semaine a été retrouvé sain et sauf [Section A]

Un étudiant marseillais, âgé 21 ans, a disparu il y a une semaine. Il a été vu pour la dernière fois par un de ses amis quand il rentrait de son université vendredi dernier.

Ses parents ont porté plaint sur cette disparition au bout de deux jours. Les parents ont dit à la police que c’était la première fois qu’il était loin de chez lui pendant deux jours.

La police avait lancé une recherche pour trouver ce garçon. Ils ont fouillé l’université, la banlieue, les maisons de ses amis, mais malheureusement, l’étudiant n’a pas été trouvé.

Hier soir, il est…


This is part four of the series of TEF resources I am sharing. Please find the links to the other blogs in this series below.

  1. TEF Part 1: Essay Writing Examples — Section A
  2. TEF Part 2: Essay Writing Examples — Section A
  3. TEF Part 3: Essay Writing Examples — Section B
  4. TEF Part 4: Essay Writing Examples — Section B

In this section, we will see 6 more examples for Section B of Production Écrit

1. Il est inutile de connaître une autre langue étrangère que l’anglais

M. Niruhan,
18 Rue de la République,
Versailles.

M. Holland,
Le Rédacteur en Chef,
Le Monde,
65432 Paris.
Versailles, le 30 août 2020

Monsieur…


This is part three of the series of TEF resources I am sharing. Please find the links to the other blogs in this series below.

  1. TEF Part 1: Essay Writing Examples — Section A
  2. TEF Part 2: Essay Writing Examples — Section A
  3. TEF Part 3: Essay Writing Examples — Section B
  4. TEF Part 4: Essay Writing Examples — Section B

In this section, we will see 5 examples for Section B of Production Écrit. In this section, you are given an opinion piece from a newspaper and you are asked to write a response to the news article. You…


This is part two of the series of TEF resources I am sharing. Please find the links to the other blogs in this series below.

  1. TEF Part 1: Essay Writing Examples — Section A
  2. TEF Part 2: Essay Writing Examples — Section A
  3. TEF Part 3: Essay Writing Examples — Section B
  4. TEF Part 4: Essay Writing Examples — Section B

In this section, we will see 7 more examples for Section A of Production Écrit

1. Un père et son fils de 6 ans ont été renversés samedi vers 11 h

Un père et son fils de 6 ans ont été renversés samedi vers 11 h. Une voiture qui venait très vite n’avait pas pu…


This blog is the first part of the series I am writing on TEF — Test d’Évaluation du Français to share learning resources. They are notoriously difficult to find on the internet and there is very little information on the exam when compared to IELTS. Please find the links to the other blogs in this series below.

  1. TEF Part 1: Essay Writing Examples — Section A
  2. TEF Part 2: Essay Writing Examples — Section A
  3. TEF Part 3: Essay Writing Examples — Section B
  4. TEF Part 4: Essay Writing Examples — Section B

TEF Exam is administered by Chambre de…


Source: http://adriangrigoras.com/blog/caching/

Integrated systems need to interact with databases as they depend on those for data storage, share information with other systems, and preserve system state over restarts and failures. One of the significant drawbacks of traditional databases is their higher read-write latencies compared to in-memory data stores, as the databases use hard disks for storing data. Though, such high latencies are generally acceptable for traditional transaction processing when they are used for stream processing use cases, where it is required to read and write millions of events pre-second, the additional latency introduced by the databases can reduce the overall throughput. …


In this blog, part 2 of the series on Apache Kafka integration for Siddhi, we will see in detail how to use Apache Kafka as a source for 2 node minimum high availability (HA) deployment of Siddhi Stream Processor. Read Part 1 of this series if you haven’t already to gain insight as to how Kafka can be used together with Siddhi using a toy example. This blog is organized into the following section;

  1. Need for High Availability
  2. Two Node Minimum HA Deployment of Stream Processor
  3. How Kafka Can be Used as A Source for HA Nodes
  4. Introduction to An…

Niruhan Viswarupan

Senior Software Engineer @ Sysco LABS, Former SE @ WSO2 Inc., ENTC grad @ University of Moratuwa, Sri Lanka. www.niruhan.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store