Actions Class

Drag and Drop:

WebElement source=driver.findElement(By.id("sourceid");
WebElement destination=driver.findElement(By.id("destinationid");
Actions act=new Actions(driver);
act.dragAndDrop(source,destination).perform();


Double Click:
WebElement e1= driver.findElement(By.id("elementid"));
Actions act=new Actions(driver);
act.doubleClick(e1).build().perform();

Mouse Hovering:
Actions act = new Actions(driver);
WebElement e = driver.findElement(By.id("xyz"));
act.moveToElement(e).build().perform();

Right Click/Context Clicking:
WebElement e= driver.findElement(By.id("rtclickelement"));
Actions action = new Actions(driver).contextClick(e);
action.build().perform()

or we can also write:

WebElement e= driver.findElement(By.id("rtclickelement"));
Actions action= new Actions(driver);

action.contextClick(e).build().perform();