package org.verapdf.model.impl.pb.pd.images;

import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.pdmodel.PDResources;
import org.apache.pdfbox.pdmodel.graphics.image.PDInlineImage;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.IOException;
import java.net.URISyntaxException;

/**
 * @author Evgeniy Muravitskiy
 */
public class PBoxPDInlineImageTest extends PBoxPDXImageTest {

	@BeforeClass
	public static void setUp() throws IOException, URISyntaxException {
		expectedType = TYPES.contains(PBoxPDInlineImage.INLINE_IMAGE_TYPE) ?
				PBoxPDInlineImage.INLINE_IMAGE_TYPE : null;
		expectedID = null;

		final COSDictionary parameters = getParameters();
		PDInlineImage image = new PDInlineImage(parameters, new byte[0], new PDResources(new COSDictionary()));
		actual = new PBoxPDInlineImage(image);
	}

	private static COSDictionary getParameters() {
		COSDictionary dictionary = new COSDictionary();
		dictionary.setItem(COSName.CS, COSName.RGB);
		dictionary.setItem(COSName.F, COSName.LZW_DECODE_ABBREVIATION);
		return dictionary;
	}

	@Override
	@Test
	public void testSubtypeMethod() {
		Assert.assertNull(((org.verapdf.model.pdlayer.PDInlineImage) actual).getSubtype());
	}

	@Test
	public void testFMethod() {
		Assert.assertEquals("LZW", ((org.verapdf.model.pdlayer.PDInlineImage) actual).getF());
	}

}

@@ -230,16 +230,45 @@
 eImage;%0A
+import org.junit.AfterClass;%0A
 import o
@@ -1440,10 +1440,140 @@
 ));%0A%09%7D%0A%0A
+%09@AfterClass%0A%09public static void tearDown() throws IOException %7B%0A%09%09expectedType = null;%0A%09%09expectedID = null;%0A%09%09actual = null;%0A%09%7D%0A%0A
 %7D%0A

Fix in inline image test