### Question:
MacUtils { public static byte[] macAddress() { byte[] override = getOverride(); return override != null ? override : realMacAddress(); }  static byte[] getOverride(); static byte[] realMacAddress(); static byte[] macAddress(); static final String OVERRIDE_MAC_PROP; }### Answer:
@Test public void verifyMac() { byte[] mac; try { mac = MacUtils.macAddress(); } catch(UnsupportedOperationException e) { e.printStackTrace(); System.setProperty(MacUtils.OVERRIDE_MAC_PROP, "00:DE:AD:BE:EF:00"); mac = MacUtils.macAddress(); } Assert.assertNotNull("Could not retrieve MAC", mac); Assert.assertTrue("Invalid MAC address", mac.length == 6); }
@Test public void verifyOverride() { System.setProperty(MacUtils.OVERRIDE_MAC_PROP, "00:DE:AD:BE:EF:11"); byte[] mac = MacUtils.macAddress(); Assert.assertNotNull("Could not retrieve MAC", mac); Assert.assertTrue("Invalid MAC address", mac.length == 6); Assert.assertEquals("Unexpected MAC address", "[0, -34, -83, -66, -17, 17]", Arrays.toString(mac)); System.clearProperty(MacUtils.OVERRIDE_MAC_PROP); }