### Question:
Upgrade { protected boolean wasExecuted(OnmsUpgrade upg) throws OnmsUpgradeException { return getUpgradeStatus().wasExecuted(upg); }  UpgradeStatus getUpgradeStatus(); void setUpgradeStatus(UpgradeStatus upgradeStatus); String getClassScope(); void setClassScope(String classScope); void execute(); static void main(String args[]);  }### Answer:
@Test public void testUpgrade() throws Exception { Assert.assertFalse(upgradeStatus.wasExecuted(new TestUpgradeNothing())); performUpgrade("org.opennms.upgrade.tests"); Assert.assertTrue(upgradeStatus.wasExecuted(new TestUpgradeNothing())); Assert.assertEquals(3, UpgradeHelper.getExecutedList().size()); Assert.assertEquals(TestUpgradeNothing.class.getName(), UpgradeHelper.getExecutedList().get(0)); Assert.assertEquals(TestUpgradeA.class.getName(), UpgradeHelper.getExecutedList().get(1)); Assert.assertEquals(TestUpgradeB.class.getName(), UpgradeHelper.getExecutedList().get(2)); Assert.assertEquals(1, UpgradeHelper.getRolledBackList().size()); Assert.assertEquals(TestUpgradeWIthException.class.getName(), UpgradeHelper.getRolledBackList().get(0)); }