@Test
	public void testAll() {
		int id = program.startTransaction("Test");
		try {

			Address start = addr(0);
			try {
				mem.createInitializedBlock("first", start, 100, (byte) 0,
					TaskMonitor.DUMMY, false);
			}
			catch (Exception e) {
				Assert.fail("TestProgramContext: couldn't add block to memory");
			}

			ProgramContext programContext = program.getProgramContext();
			boolean didSomething = false;

			Address startAddress = start;
			Address endAddress = addr(0x30);

			// stick a value into each one!
			BigInteger value = BigInteger.valueOf(255);

			for (Register register : programContext.getRegisters()) {
				Register reg = register;
				if (!reg.isBaseRegister() && reg.isProcessorContext()) {
					continue;
				}
				try {
					programContext.setValue(reg, startAddress, endAddress, value);
				}
				catch (Exception e) {
					Assert.fail(e.getMessage());
				}
				assertNotNull(programContext.getValue(reg, startAddress, false));
				assertNotNull(programContext.getValue(reg, endAddress, false));
				Address insideAddr1 = startAddress.add(10);
				BigInteger val = programContext.getValue(reg, insideAddr1, false);
				assertTrue("unexpected context value for " + reg + ": " + val, value.equals(val));

				Address insideAddr2 = startAddress.add(29);
				assertEquals(value, programContext.getValue(reg, insideAddr2, false));

				Address badAddress = endAddress.add(10);
				assertNull(programContext.getValue(reg, badAddress, false));

				AddressRangeIterator registerValueAddressRanges =
					programContext.getRegisterValueAddressRanges(reg);
				assertTrue(registerValueAddressRanges.hasNext());
				AddressRange range = registerValueAddressRanges.next();
				assertEquals(startAddress, range.getMinAddress());
				assertEquals(endAddress, range.getMaxAddress());
				assertTrue(!registerValueAddressRanges.hasNext());

				registerValueAddressRanges =
					programContext.getRegisterValueAddressRanges(reg, insideAddr1, insideAddr1);
				assertTrue(registerValueAddressRanges.hasNext());
				range = registerValueAddressRanges.next();
				assertEquals(insideAddr1, range.getMinAddress());
				assertEquals(insideAddr1, range.getMaxAddress());
				assertTrue(!registerValueAddressRanges.hasNext());

				range = new AddressRangeImpl(startAddress, endAddress);
				assertEquals(range,
					programContext.getRegisterValueRangeContaining(reg, startAddress));
				assertEquals(range,
					programContext.getRegisterValueRangeContaining(reg, endAddress));
				assertEquals(range,
					programContext.getRegisterValueRangeContaining(reg, insideAddr1));

				assertEquals(
					new AddressRangeImpl(endAddress.next(),
						endAddress.getAddressSpace().getMaxAddress()),
					programContext.getRegisterValueRangeContaining(reg, badAddress));

				didSomething = true;
			}
			assertTrue(didSomething);
		}
		finally {
			program.endTransaction(id, false);
		}
	}
quick and dirty test of the ProgramContextImpl just to see
if the values are being set for specified address range.
The ProgramContextPlugin will be a more complete test
program, with a gui interface to specify the values and
select/highlight an address range.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/util/ProgramContextTest.java