### Question:
Base1SubFieldPackager extends ISOBasePackager { protected boolean emitBitMap() { return fld[0] instanceof ISOBitMapPackager; }  int unpack(ISOComponent m, byte[] b); @Override byte[] pack(ISOComponent m);  }### Answer:
@Test public void testEmitBitMap() throws Throwable { Base1SubFieldPackager base1SubFieldPackager = new Base1SubFieldPackager(); ISOFieldPackager[] fld = new ISOFieldPackager[1]; base1SubFieldPackager.setFieldPackager(fld); boolean result = base1SubFieldPackager.emitBitMap(); assertFalse(result, "result"); }
@Test public void testEmitBitMapThrowsArrayIndexOutOfBoundsException() throws Throwable { Base1SubFieldPackager f126Packager = new Base1Packager.F126Packager(); ISOFieldPackager[] fld = new ISOFieldPackager[0]; f126Packager.setFieldPackager(fld); try { f126Packager.emitBitMap(); fail("Expected ArrayIndexOutOfBoundsException to be thrown"); } catch (ArrayIndexOutOfBoundsException ex) { if (isJavaVersionAtMost(JAVA_10)) { assertEquals("0", ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Index 0 out of bounds for length 0", ex.getMessage(), "ex.getMessage()"); } } }