Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our YouTube channel to start Rocking right now!
Gain access to the industrys' best FREE video guides including:
1. Core Java guides
2. Enterprise Java guides
3. JVM insights, configuration and troubleshooting guides
4. Java performance guides
5. Java Interview Questions
and many more ....

Spring Data Mock DAO

spring-interview-questions-answers

Warning, the following code example is suitable for a narrow range of use cases… but it’s strangely useful. When writing tests against Spring services or controllers, we may wish to mock the DAO layer completely. This can be achieved: @MockBean private MyDao myDao; And the mock dao is then wired into our services etc. However, there are situations where we’re ...

Read More »

Different Techniques Of Debugging Selenium Based Test Scripts

Writing and maintaining the test automation code is not always a piece of cake. As a matter of fact, we frequently face many scenarios where automated test cases don’t work as expected and might lead to false positive or false negative results, in such cases, debugging is the only way out. Debugging is the primary skill set that an automation ...

Read More »

Overcoming web test automation challenges with ease

Automation has become an integral part of any software development process. It has contributed to the digital transformation of many organizations worldwide. In this era where agile development is adopted widely to stay ahead in the competition, the demand for automation has become inevitable. Organizations are relying on their fast and sleek websites and mobile apps as their primary source ...

Read More »

Java: Creating Terabyte Sized Queues with Low-Latency

Queues are often fundamental components in software design patterns. But, what if there are millions of messages received every second and multi-process consumers need to be able to read the complete ledger of all messages? Java can only hold so much information before the heap becomes a limiting factor with high-impacting garbage collections as a result, potentially preventing us from ...

Read More »

RealVPN: Lifetime Subscription

Reliable, Convenient, & Online Access Anywhere with Any Devices Hey fellow geeks, This week, on our JCG Deals store, we have another extreme offer. We are offering a massive 92% off on RealVPN: Lifetime Subscription. Get it now with only $19,99 instead of the original price of $249. Real security for your privacy online and free Internet access. RealVPN encrypts ...

Read More »

Testing promise rejection in JavaScript with Jest

The code Let’s consider a simple function that returns a Promise that can either resolve or reject depending on the value ofthe first argument: export default function promiseMe(result, timeout = 1000) { return new Promise((resolve, reject) => { setTimeout(() => { if (result instanceof Error || result.startsWith("Error")) { reject(result) } else { resolve(result) } }, timeout) }) } While testing ...

Read More »

Testing exceptions in JavaScript with Jest

The code Let’s consider a simple function that checks for equality of two passwords, and it throws an error when the first one is not provided: export default function samePasswordsValidator(password, otherPassword) { if (!password) { throw new Error("no password given"); } return password === otherPassword; } Try-catch idiom (bad) When testing the code that throws exceptions, one immediately comes up ...

Read More »