}
@Test
public void testGetAutoFlashCompensationDescription() throws Exception
{
NikonType2MakernoteDirectory directory = new NikonType2MakernoteDirectory();
NikonType2MakernoteDescriptor descriptor = new NikonType2MakernoteDescriptor(directory);
// no entry exists
assertNull(descriptor.getAutoFlashCompensationDescription());
directory.setByteArray(NikonType2MakernoteDirectory.TAG_AUTO_FLASH_COMPENSATION, new byte[] { 0x06, 0x01, 0x06 });
assertEquals("1 EV", descriptor.getAutoFlashCompensationDescription());
directory.setByteArray(NikonType2MakernoteDirectory.TAG_AUTO_FLASH_COMPENSATION, new byte[] { 0x04, 0x01, 0x06 });
assertEquals("0.67 EV", descriptor.getAutoFlashCompensationDescription());
directory.setByteArray(NikonType2MakernoteDirectory.TAG_AUTO_FLASH_COMPENSATION, new byte[] { 0x02, 0x01, 0x06 });
assertEquals("0.33 EV", descriptor.getAutoFlashCompensationDescription());
directory.setByteArray(NikonType2MakernoteDirectory.TAG_AUTO_FLASH_COMPENSATION, new byte[] { (byte)0xFE, 0x01, 0x06 });
assertEquals("-0.33 EV", descriptor.getAutoFlashCompensationDescription());
}