We all have written unit tests where in a single test tests for different possible input-output combinations. Lets look how its done by taking a simple fibonacci series example.
The below code computes the fibonacci series for number of elements mentioned
Lets see the conventional way of testing the above code with multiple input [...]
We write service APIs which cater to certain business logic. There are few cross-cutting concerns that cover all service APIs like Security, Logging, Auditing, Measuring Latencies and so on. This is a repetitive non-business code which can be reused among other methods. One way to reuse is to move these repetitive code into its own [...]
If you want to:
– learn about commands used for OS monitoring
– understand about different components of JVM
– monitor and tune JVM to improve its performance.
then, Java Performance is the book you should be picking. This book covers :
– command line tools for OS monitoring.
We all write unit tests but the challenge we face at times is that the unit under test might be dependent on other components. And configuring other components for unit testing is definitely an overkill. Instead we can make use of Mocks in place of the other components and continue with the unit testing.
Peopleware is a must read for Managers who want to explore and learn about different managerial responsibilities and learn about what not to be done while executing those responsibilities. The content is presented with a touch of humour so you need not be surprised if you are found laughing while you are reading. [...]
JSON processing is not supported out of the box in Java. One would have to make use of 3rd part libraries to enable JSON processing. But with JSR 353 and its reference implementation JSON processing is being brought into the Java language. JavaEE 7 has already included the reference implementation.
Packt Publishing is giving everyone the chance to explore its full range of over 1600 DRM-free eBooks this Columbus Day at a massive 50% off at www.packtpub.com, for 4 whole days. Customers simply use the code COL50 in their cart – as many times as they like until Monday October 21st. The offer [...]
This post is inspired by the Double Brace Initialization concept explained here. This technique can be used for creating and initializing objects and represent these operations in a single expression. And the efficiency of this technique has been heavily discussed on stackoverflow.
Connect to us …
- Parameterized Test Runner in JUnit August 25, 2014
- Simple Aspect Oriented Programming (AOP) using CDI in JavaEE August 24, 2014
- Book Review: Java Performance by Charlie Hunt and Binu John August 20, 2014
- Getting started with Mocking in Java using Mockito February 23, 2014
- Another sample for using JAXB November 24, 2013
Some of the links contained within this site have my referral id, which provides me with a small commission for each sale. Thank you for your support.