@Test
	public void testBlock2() throws IOException {
		BinaryReader br = br((byte) 0, (byte) 1, (byte) 0x55, (byte) 0, (byte) 0);

		DWARFAttributeValue result = read(br, DW_AT_byte_size, DW_FORM_block2);
		assertTrue("Should be block", result instanceof DWARFBlobAttribute);
		assertEquals("should be 1", 1, ((DWARFBlobAttribute) result).getLength());
		assertEquals("should be 0x55", 0x55, ((DWARFBlobAttribute) result).getBytes()[0]);

		result = read(br, DW_AT_byte_size, DW_FORM_block1);
		assertTrue("Should be block", result instanceof DWARFBlobAttribute);
		assertEquals("should be 0", 0, ((DWARFBlobAttribute) result).getLength());

		byte[] bytes = new byte[2 + 0xffff /* max_ushort */];
		bytes[0] = (byte) 0xff;
		bytes[1] = (byte) 0xff;
		result = read(br(bytes), DW_AT_byte_size, DW_FORM_block2);
		assertTrue("Should be block", result instanceof DWARFBlobAttribute);
		assertEquals("should be 64k", 0xffff, ((DWARFBlobAttribute) result).getLength());
	}
Test reading binary representations of DWARF attributes from raw bytes.
Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/dwarf/attribs/DWARFAttributeFactoryTest.java