### Question:
TextureChooser extends JDialog { protected static int[] getPixelsForImageResource(String resource) { ImagePlus img = ImageJUtils.openFromResource(resource); return (int[]) img.getProcessor().getPixels(); } TextureChooser(); int showDialog(); int showDialog(String texture); TexHexTriplet getTexture(); static final int CANCEL_OPTION; static final int APPROVE_OPTION; static final int ERROR_OPTION; }### Answer:
@Test public void testGetPixelsForImageResource() throws Exception { int[] test = TextureChooser.getPixelsForImageResource(TextureChooser.resTextureGrass); assertEquals(5476, test.length); }