@Test
public void testDeserialize() throws Exception {

  Reader reader = new InputStreamReader(getClass().getResourceAsStream("/test.json"), "UTF-8");
  DashboardData data = JsonBuilder.forSaveFile().fromJson(reader, DashboardData.class);
  DashboardTabPane dashboard = data.getTabPane();
  assertEquals(2 + 1, dashboard.getTabs().size(), "There should be 2 dashboard tabs and 1 adder tab");
  DashboardTab firstTab = (DashboardTab) dashboard.getTabs().get(0);
  DashboardTab secondTab = (DashboardTab) dashboard.getTabs().get(1);
  assertEquals("First Tab", firstTab.getTitle(), "Title of the first tab was wrong");
  assertEquals("Second Tab", secondTab.getTitle(), "Title of the second tab was wrong");
  assertFalse(firstTab.isAutoPopulate(), "The first tab should not be autopopulating");
  assertTrue(secondTab.isAutoPopulate(), "The second tab should be autopopulating");
  assertEquals("", firstTab.getSourcePrefix(), "The first tab should not have a source prefix");
  assertEquals("foo", secondTab.getSourcePrefix(), "The second tab should autopopulate from 'foo'");
  assertEquals(1, firstTab.getWidgetPane().getTiles().size(), "There should only be one tile");
  Tile tile = firstTab.getWidgetPane().getTiles().get(0);
  Component content = tile.getContent();
  assertTrue(content instanceof DummyBooleanBox);
}