@Test
public void testSetLayoutStyle() throws Exception {

    assertSame(LayoutStyle.MAC, searchField.getLayoutStyle());
    assertTrue(searchField.isMacLayoutStyle());
    assertFalse(searchField.getCancelButton().isVisible());
    assertTrue(searchField.getFindButton().isVisible());
    searchField.setText("test");
    assertTrue(searchField.getCancelButton().isVisible());
    assertTrue(searchField.getFindButton().isVisible());
    searchField.setLayoutStyle(LayoutStyle.VISTA);
    assertTrue(searchField.isVistaLayoutStyle());
    assertTrue(searchField.getCancelButton().isVisible());
    assertFalse(searchField.getFindButton().isVisible());
}