src/test/java/seedu/address/logic/commands/CommandTestUtil.java
public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {
        // we are unable to defensively copy the model for comparison later, so we can
        // only do so by copying its components.
        AddressBook expectedAddressBook = new AddressBook(actualModel.getAddressBook());
        List<ReadOnlyParcel> expectedFilteredList = new ArrayList<>(actualModel.getFilteredParcelList());

        try {
            command.execute();
            fail("The expected CommandException was not thrown.");
        } catch (CommandException e) {
            assertEquals(expectedMessage, e.getMessage());
            assertEquals(expectedAddressBook, actualModel.getAddressBook());
            assertEquals(expectedFilteredList, actualModel.getFilteredParcelList());
        }
    }
/**
     * Executes the given {@code command}, confirms that <br>
     * - a {@code CommandException} is thrown <br>
     * - the CommandException message matches {@code expectedMessage} <br>
     * - the address book and the filtered parcel list in the {@code actualModel} remain unchanged
     */
Executes the given  command, confirms that 
- a  CommandException is thrown 
- the CommandException message matches  expectedMessage 
- the address book and the filtered parcel list in the  actualModel remain unchanged
Executes the given command confirms that - a CommandException is thrown - the CommandException message matches expectedMessage - the address book and the filtered parcel list in the actualModel remain unchanged
public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {
        AddressBook expectedAddressBook = new AddressBook(actualModel.getAddressBook());
        List<ReadOnlyParcel> expectedFilteredList = new ArrayList<>(actualModel.getFilteredParcelList());
        try {
            command.execute();
            fail("The expected CommandException was not thrown.");
        } catch (CommandException e) {
            assertEquals(expectedMessage, e.getMessage());
            assertEquals(expectedAddressBook, actualModel.getAddressBook());
            assertEquals(expectedFilteredList, actualModel.getFilteredParcelList());
        }
    }
public static void assertCommandFailure ( Command command , Model actualModel , String expectedMessage ) { AddressBook expectedAddressBook = new AddressBook ( actualModel . getAddressBook ( ) ) ; List < ReadOnlyParcel > expectedFilteredList = new ArrayList < > ( actualModel . getFilteredParcelList ( ) ) ; try { command . execute ( ) ; fail ( "The expected CommandException was not thrown." ) ; } catch ( CommandException e ) { assertEquals ( expectedMessage , e . getMessage ( ) ) ; assertEquals ( expectedAddressBook , actualModel . getAddressBook ( ) ) ; assertEquals ( expectedFilteredList , actualModel . getFilteredParcelList ( ) ) ; } }
Executes the given {@code command}, confirms that <br>
 - a {@code CommandException} is thrown <br>
 - the CommandException message matches {@code expectedMessage} <br>
 - the address book and the filtered parcel list in the {@code actualModel} remain unchanged
Executes the given { @code command } confirms that <br > - a { @code CommandException } is thrown <br > - the CommandException message matches { @code expectedMessage } <br > - the address book and the filtered parcel list in the { @code actualModel } remain unchanged
// we are unable to defensively copy the model for comparison later, so we can // only do so by copying its components.