public function testAddFieldToEmptyPalette()
{
$pm = PaletteManipulator::create()->addLegend('name_legend', '', PaletteManipulator::POSITION_PREPEND)->addField('name', 'name_legend', PaletteManipulator::POSITION_APPEND);
$this->assertEquals('{name_legend},name', $pm->applyToString(''));
$pm = PaletteManipulator::create()->addField('name', 'name_legend', PaletteManipulator::POSITION_APPEND);
$this->assertEquals('name', $pm->applyToString(''));
$pm = PaletteManipulator::create()->addField('name', 'name_legend', PaletteManipulator::POSITION_APPEND, 'name_legend');
$this->assertEquals('{name_legend},name', $pm->applyToString(''));
}