Esx Command


Leave a comment


Leave a comment

Marshalling & UnMarshalling


To convert the Java Object  to XML


convert XML to Java Object

, , , , ,

Leave a comment



It is used to test the individual function of the class (Unit testing)


Annotation and its use :-

It executes begining every  class added in the  testsuite

It executes end of the  every  class added in the testsuite

By using this  @Test, Junit pick up the test method and execute and return the result

@Test (expected = Exception.class)
Exception like IllegalArgumentException, RunTimeException, etc..
We can expect the exception which will  occur while execute the test case

Fail the testcase if the execution  takes after the particular time, which is  mentioned in timout parameter

Ignore the method  which have @Ignore

Execute before every method

Execute before every method

Use to execute the testcase for multiple times based on the input


@RunWith(value = Parameterized.class)


  • Method should be public
  • Method should not have parameter

By using Junit 4:
We can’t add dynamic suite class

By using JUnit 3:

We can add the classes dynamic

Here I attached a sample program :


package com.junit.packA;

import org.junit.Assert;
import org.junit.Test;

public class Addition {
public void CaseOne(){
Assert.assertTrue(add(15, 10));


private boolean add(int i, int j) {
if(i > j){

return true;
return false;



package com.junit.packA;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

public class MainSuite {


Run procedure in Eclipse:

Right click the MainSuite class in eclipse and select  RunAs –> Junit Test

, , ,

Leave a comment

Collection RealTimeExample

Hi Guys,

Here I specified a  collection and its subclasses

For  easy understanding I specify feautures and its relevant  example for each Subclasses:



  • Key-Value pair
  • Does not allow null for both key & value
  • Synchronized ie ) Concurrent modification not allowed

, , , , ,

Leave a comment

Java Naming convention

Best Explanation :Java Naming Convention

Leave a comment

OnLine BookMark

For online bookmark, use this site and register and  then u can  your favourite link in anywhere else

Leave a comment