### Question:
InstallItem { public static Item installItem(Context c, InProgressSubmission is) throws SQLException, IOException, AuthorizeException { return installItem(c, is, null); }  static Item installItem(Context c, InProgressSubmission is); static Item installItem(Context c, InProgressSubmission is,
            String suppliedHandle); static Item restoreItem(Context c, InProgressSubmission is,
            String suppliedHandle); static String getBitstreamProvenanceMessage(Item myitem);  }### Answer:
@Test public void testInstallItem_Context_InProgressSubmission() throws Exception { context.turnOffAuthorisationSystem(); Collection col = Collection.create(context); WorkspaceItem is = WorkspaceItem.create(context, col, false); Item result = InstallItem.installItem(context, is); context.restoreAuthSystemState(); assertThat("testInstallItem_Context_InProgressSubmission 0", result, equalTo(is.getItem())); }
@Test public void testInstallItem_validHandle() throws Exception { context.turnOffAuthorisationSystem(); String handle = "1345/567"; Collection col = Collection.create(context); WorkspaceItem is = WorkspaceItem.create(context, col, false); Item result = InstallItem.installItem(context, is, handle); context.restoreAuthSystemState(); assertThat("testInstallItem_validHandle", result, equalTo(is.getItem())); assertThat("testInstallItem_validHandle", result.getHandle(), equalTo(handle)); }
@Test(expected=SQLException.class) public void testInstallItem_invalidHandle() throws Exception { new NonStrictExpectations() { AuthorizeManager authManager; { AuthorizeManager.authorizeActionBoolean((Context) any, (Community) any, Constants.ADD); result = false; AuthorizeManager.isAdmin((Context) any); result = true; } }; String handle = "1345/567"; Collection col = Collection.create(context); WorkspaceItem is = WorkspaceItem.create(context, col, false); WorkspaceItem is2 = WorkspaceItem.create(context, col, false); Item result1 = InstallItem.installItem(context, is, handle); Item result2 = InstallItem.installItem(context, is2, handle); fail("Exception expected"); }