@Test
  public void checkThatPrivateLogIsSaved() {
    DrawAction drawAction = new DrawAction(getApp().db);

    long beforeInsert = getApp().gameLogCollection.count();
    // Make a draw
    Optional<GameLog> gameLogOptional =
        drawAction.draw(getApp().pbfId, getApp().playerId, SheetName.GREAT_PERSON);
    assertThat(gameLogOptional.get().getDraw()).isNotNull();
    assertThat(gameLogOptional.get().getDraw().getPlayerId())
        .isEqualToIgnoringCase(getApp().playerId);
    assertThat(gameLogOptional.get().getDraw().getItem()).isInstanceOf(GreatPerson.class);
    long afterInsert = getApp().gameLogCollection.count();
    assertThat(beforeInsert).isLessThan(afterInsert);
  }
  @Test
  public void checkThatPublicLogIsSaved() {
    DrawAction drawAction = new DrawAction(getApp().db);

    long beforeInsert = getApp().gameLogCollection.count();
    // Make a draw
    Optional<GameLog> gameLogOptional =
        drawAction.draw(getApp().pbfId, getApp().playerId, SheetName.ARTILLERY);
    assertTrue(gameLogOptional.isPresent());

    assertThat(gameLogOptional.get().getDraw()).isNotNull();
    assertThat(gameLogOptional.get().getDraw().getPlayerId())
        .isEqualToIgnoringCase(getApp().playerId);
    assertThat(gameLogOptional.get().getDraw().getItem()).isInstanceOf(Artillery.class);
    long afterInsert = getApp().gameLogCollection.count();
    assertThat(beforeInsert).isLessThan(afterInsert);
  }
 public void startAction() {
   ToolPanel.INSTANCE.setCurrentTool(
       PixelTool.INSTANCE, DrawAction.getAction(SetPixelToolAction.class));
   Palette pal = Tool.getCurrentPalette();
   result = pal.reduceColours(Palette.GIF_MAX_COLOURS);
 }