### Question:
DataUtilities { public static Address getMaxAddressOfUndefinedRange(Program program, Address addr) { Listing listing = program.getListing(); Data data = listing.getDataContaining(addr); if (data == null || !Undefined.isUndefined(data.getDataType())) { return null; } Address endOfRangeAddress = data.getMaxAddress(); MemoryBlock block = program.getMemory().getBlock(addr); if (block == null) { return null; } Address limitAddress = block.getEnd(); CodeUnit cu = data; while (cu != null) { if (cu.getAddress().compareTo(limitAddress) > 0) { endOfRangeAddress = limitAddress; break; } if (!(cu instanceof Data) || !Undefined.isUndefined(((Data) cu).getDataType())) { endOfRangeAddress = cu.getMinAddress().previous(); break; } endOfRangeAddress = cu.getMaxAddress(); cu = listing.getDefinedCodeUnitAfter(endOfRangeAddress); } if (cu == null) { endOfRangeAddress = limitAddress; } return endOfRangeAddress; } private  DataUtilities(); static boolean isValidDataTypeName(String name); static Data createData(Program program, Address addr, DataType newDataType, int length,
			boolean stackPointers, ClearDataMode clearMode); static DataType reconcileAppliedDataType(DataType originalDataType, DataType newDataType,
			boolean stackPointers); static Data getDataAtLocation(ProgramLocation loc); static Data getDataAtAddress(Program program, Address address); static Address getMaxAddressOfUndefinedRange(Program program, Address addr); static boolean isUndefinedData(Program program, Address addr); static Data getNextNonUndefinedDataAfter(Program program, Address addr,
			Address maxAddr); static Address findFirstConflictingAddress(Program program, Address addr, int length,
			boolean ignoreUndefinedData); static boolean isUndefinedRange(Program program, Address startAddress,
			Address endAddress);  }### Answer:
@Test public void testMaxUndefined1() { Assert.assertEquals(addr(0xf0), DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xe7))); }
@Test public void testMaxUndefined2() { Assert.assertEquals(null, DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xf1))); }
@Test public void testMaxUndefined3() { Assert.assertEquals(null, DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xf2))); }
@Test public void testMaxUndefined4() { Assert.assertEquals(null, DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xf7))); }
@Test public void testMaxUndefined5() { Assert.assertEquals(null, DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xf9))); }
@Test public void testMaxUndefined6() { Assert.assertEquals(addr(0xff), DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xfc))); }
@Test public void testMaxUndefined7() { Assert.assertEquals(addr(0xff), DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xfd))); }
@Test public void testMaxUndefined8() { Assert.assertEquals(addr(0xf6), DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xf3))); }
@Test public void testMaxUndefined9() { Assert.assertEquals(addr(0xf0), DataUtilities.getMaxAddressOfUndefinedRange(program, addr(0xed))); }