### Question:
VirtualMachine { public int getHealth(int wizard) { return wizards[wizard].getHealth(); } VirtualMachine(); void execute(int[] bytecode); Stack<Integer> getStack(); void setHealth(int wizard, int amount); void setWisdom(int wizard, int amount); void setAgility(int wizard, int amount); int getHealth(int wizard); int getWisdom(int wizard); int getAgility(int wizard); Wizard[] getWizards();  }### Answer:
@Test public void testGetHealth() { var wizardNumber = 0; var bytecode = new int[8]; bytecode[0] = LITERAL.getIntValue(); bytecode[1] = wizardNumber; bytecode[2] = LITERAL.getIntValue(); bytecode[3] = 50; bytecode[4] = SET_HEALTH.getIntValue(); bytecode[5] = LITERAL.getIntValue(); bytecode[6] = wizardNumber; bytecode[7] = GET_HEALTH.getIntValue(); var vm = new VirtualMachine(); vm.execute(bytecode); assertEquals(Integer.valueOf(50), vm.getStack().pop()); }