src/test/java/systemtests/EditCommandSystemTest.java
private void assertCommandSuccess(String command, Index toEdit, ReadOnlyParcel editedParcel,
            Index expectedSelectedCardIndex) {
        Model expectedModel = getModel();
        try {
            expectedModel.editParcelCommand(expectedModel.getActiveList().get(toEdit.getZeroBased()), editedParcel);
        } catch (DuplicateParcelException dpe) {
            throw new IllegalArgumentException(
                    "editedParcel is a duplicate in expectedModel.");
        } catch (ParcelNotFoundException pnfe) {
            throw new IllegalArgumentException(
                    "editedParcel is not found in the Model");
        }

        assertCommandSuccess(command, expectedModel,
                String.format(EditCommand.MESSAGE_EDIT_PARCEL_SUCCESS, editedParcel), expectedSelectedCardIndex);
    }
/**
     * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,<br>
     * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.<br>
     * 2. Asserts that the model related components are updated to reflect the parcel at index {@code toEdit} being
     * updated to values specified {@code editedParcel}.<br>
     * @param toEdit the index of the current model's filtered list.
     * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)
     */
Performs the same verification as  assertCommandSuccess(String, Model, String, Index) and in addition,
1. Asserts that result display box displays the success message of executing  EditCommand.
2. Asserts that the model related components are updated to reflect the parcel at index  toEdit being
updated to values specified  editedParcel.
@param toEdit the index of the current model's filtered list.
Performs the same verification as assertCommandSuccess ( String Model String Index ) and in addition 1 . Asserts that result display box displays the success message of executing EditCommand . 2 . Asserts that the model related components are updated to reflect the parcel at index toEdit being updated to values specified editedParcel . @param toEdit the index of the current model ' s filtered list .
private void assertCommandSuccess(String command, Index toEdit, ReadOnlyParcel editedParcel,
            Index expectedSelectedCardIndex) {
        Model expectedModel = getModel();
        try {
            expectedModel.editParcelCommand(expectedModel.getActiveList().get(toEdit.getZeroBased()), editedParcel);
        } catch (DuplicateParcelException dpe) {
            throw new IllegalArgumentException(
                    "editedParcel is a duplicate in expectedModel.");
        } catch (ParcelNotFoundException pnfe) {
            throw new IllegalArgumentException(
                    "editedParcel is not found in the Model");
        }
        assertCommandSuccess(command, expectedModel,
                String.format(EditCommand.MESSAGE_EDIT_PARCEL_SUCCESS, editedParcel), expectedSelectedCardIndex);
    }
private void assertCommandSuccess ( String command , Index toEdit , ReadOnlyParcel editedParcel , Index expectedSelectedCardIndex ) { Model expectedModel = getModel ( ) ; try { expectedModel . editParcelCommand ( expectedModel . getActiveList ( ) . get ( toEdit . getZeroBased ( ) ) , editedParcel ) ; } catch ( DuplicateParcelException dpe ) { throw new IllegalArgumentException ( "editedParcel is a duplicate in expectedModel." ) ; } catch ( ParcelNotFoundException pnfe ) { throw new IllegalArgumentException ( "editedParcel is not found in the Model" ) ; } assertCommandSuccess ( command , expectedModel , String . format ( EditCommand . MESSAGE_EDIT_PARCEL_SUCCESS , editedParcel ) , expectedSelectedCardIndex ) ; }
Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,<br>
 1.
Performs the same verification as { @code assertCommandSuccess ( String Model String Index ) } and in addition <br > 1 .