@Test
	public void testSave() throws Exception {
		for (int i = 0; i < 20; i++) {
			block.setByte(BigInteger.valueOf(i), (byte) (10 + i));
		}
		File f = createTempFile("updated", ".bin");
		blockSet.save(f.getAbsolutePath());

		assertTrue(f.exists());

		assertEquals(100, f.length());

		FileInputStream fis = new FileInputStream(f);
		byte[] b = new byte[100];
		fis.read(b);
		fis.close();
		f.delete();

		for (int i = 0; i < 20; i++) {
			assertEquals((byte) (10 + i), b[i]);
			assertTrue(!blockSet.isChanged(block, BigInteger.valueOf(i), 1));
		}
	}
Tests for the file implementation of a ByteBlockSet and ByteBlock.
Ghidra/Features/ByteViewer/src/test/java/ghidra/app/plugin/core/byteviewer/FileByteBlockTest.java