Home » Archives for Mohammad Meraj Zia » Page 11

Author Archives: Mohammad Meraj Zia

Avatar photo
Senior Java Developer

PowerMockito Constructor Example

A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated if possible. Mockito lets you write beautiful tests with a clean & simple API. In this example we will learn how to mock constructor using PowerMock. PowerMockito extends Mockito functionality with several new features such as mocking static and private ...

Read More »

PowerMockito Spy Example

A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated if possible. Mockito lets you write beautiful tests with a clean & simple API. In this example we will learn how to mock a private method. PowerMockito extends Mockito functionality with several new features such as mocking static and private ...

Read More »

Spring Test Mock Example

A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated if possible. Mockito lets you write beautiful tests with a clean & simple API. In this example we will learn how to mock spring components using Mockito. Tools and technologies used in this example are Java 1.8, Eclipse Luna 4.4.2 ...

Read More »

Mockito Mock Private Method Example with PowerMock

A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated if possible. Mockito lets you write beautiful tests with a clean & simple API. In this example we will learn how to mock a private method. Tools and technologies used in this example are Java 1.8, Eclipse Luna 4.4.2 1. ...

Read More »

Mockito Captor Example

A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated if possible. Mockito lets you write beautiful tests with a clean & simple API. In this example we will learn how to use ArgumentCaptor class/ Captor annotation of Mockito. Tools and technologies used in this example are Java 1.8, Eclipse ...

Read More »

Mockito ThenReturn Example

In this example we will learn how to use ‘thenReturn’ method of Mockito. A unit test should test a class in isolation. Side effects from other classes or the system should be eliminated if possible. Mockito lets you write beautiful tests with a clean & simple API. Tools and technologies used in this example are Java 1.8, Eclipse Luna 4.4.2 ...

Read More »

GWT Sample Application Example

In this example we will learn how to build a simple GWT application from scratch. Google Web Toolkit is a development framework for creating Ajax-enabled web applications in Java. It’s open source, completely free. Tools and technologies used in this example are Java 1.8, Eclipse Luna 4.4.2, Eclipse GWT Plugin 2.6 1. Introduction The GWT SDK provides a set of ...

Read More »

GWT Table Example

In this example we will learn how to use Tables in GWT. Google Web Toolkit is a development framework for creating Ajax-enabled web applications in Java.  A CellTable represents a tabular view that supports paging and columns. A FlexTable on the other hand allows user to create cell on demand. It can be jagged (that is, each row can contain ...

Read More »

GWT Interview Questions and Answers

In this article we will learn about the most common interview questions asked in GWT domain. We will start with the basic ones then move on to more tricky ones. 1. What is GWT? Google Web Toolkit (GWT) is a development toolkit for building ajax applications using Java. The programmer writes code in Java then GWT compiler converts this code to ...

Read More »

GWT Scroll Panel Example

In this example we will learn how to use Scroll Panel widget in GWT. Google Web Toolkit is a development framework for creating Ajax-enabled web applications in Java.  Tools and technologies used in this example are Java 1.8, Eclipse Luna 4.4.2, Eclipse GWT Plugin 2.6 1. Introduction When you wish to create a scrollable area within another panel, you should use a ...

Read More »