@Test
 public void testHide() {
   openPopupPanel();
   panel.advanced().moveByOffset(0, 200); // move the panel so the button for hide will be visible
   hide.click();
   panel.advanced().waitUntilPopupIsNotVisible().perform();
 }
 @Test
 public void testMoveTo() {
   openPopupPanel();
   moveTo.click(); // moves to [0, 0]
   Assert.assertEquals(panel.advanced().getLocations().getTopLeft().x, 0, TOLERANCE);
   Assert.assertEquals(panel.advanced().getLocations().getTopLeft().y, 0, TOLERANCE);
 }
 @Test
 public void testResize() {
   popupPanelAttributes.set(PopupPanelAttributes.maxHeight, 420);
   popupPanelAttributes.set(PopupPanelAttributes.maxWidth, 420);
   popupPanelAttributes.set(PopupPanelAttributes.height, 400);
   popupPanelAttributes.set(PopupPanelAttributes.width, 400);
   openPopupPanel();
   int widthBefore = panel.advanced().getLocations().getWidth();
   int heightBefore = panel.advanced().getLocations().getHeight();
   Assert.assertEquals(widthBefore, 400, TOLERANCE);
   Assert.assertEquals(heightBefore, 400, TOLERANCE);
   resize.click(); // resizes by 10x10
   Assert.assertEquals(panel.advanced().getLocations().getWidth(), 410, TOLERANCE);
   Assert.assertEquals(panel.advanced().getLocations().getHeight(), 410, TOLERANCE);
   resize.click(); // resizes by 10x10
   Assert.assertEquals(panel.advanced().getLocations().getWidth(), 420, TOLERANCE);
   Assert.assertEquals(panel.advanced().getLocations().getHeight(), 420, TOLERANCE);
   resize.click(); // resizes by 10x10, resize over max width/height, width/height stays at its
   // maximum
   Assert.assertEquals(panel.advanced().getLocations().getWidth(), 420, TOLERANCE);
   Assert.assertEquals(panel.advanced().getLocations().getHeight(), 420, TOLERANCE);
 }
 @Test
 public void testLeft() {
   openPopupPanel();
   getLeft.click();
   Assert.assertEquals(getValue(), panel.advanced().getLocations().getTopLeft().x, TOLERANCE);
 }
 private void openPopupPanel() {
   openButton.click();
   panel.advanced().waitUntilPopupIsVisible().perform();
 }
 @Test
 public void testShow() {
   assertNotVisible(panel.advanced().getRootElement(), "Panel should not be visible.");
   show.click();
   panel.advanced().waitUntilPopupIsVisible().perform();
 }