cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/test/java/org/cloudbus/cloudsim/mocks/Mocks.java
public static DatacenterBroker createMockBroker(int brokerId, int expectedCallsToGetId) {
        final DatacenterBroker broker = EasyMock.createMock(DatacenterBroker.class);
        EasyMock.expect(broker.getId()).andReturn(brokerId).times(expectedCallsToGetId);
        EasyMock.replay(broker);
        return broker;
    }
/**
     * Creates a mocked DatacenterBroker where the {@link DatacenterBroker#getId()}
     * is expected to be called a given number of times. For each call, it will be returned
     * the given id.
     *
     * @param brokerId the id to return for each call of {@link DatacenterBroker#getId()}
     * @param expectedCallsToGetId the number of times the {@link DatacenterBroker#getId()} is expected to be called
     * @return a mocked DatacenterBroker
     */
Creates a mocked DatacenterBroker where the  DatacenterBroker#getId()
is expected to be called a given number of times. For each call, it will be returned
the given id.

@param brokerId the id to return for each call of  DatacenterBroker#getId()
@param expectedCallsToGetId the number of times the  DatacenterBroker#getId() is expected to be called
@return a mocked DatacenterBroker
Creates a mocked DatacenterBroker where the DatacenterBroker#getId () is expected to be called a given number of times . For each call it will be returned the given id . @param brokerId the id to return for each call of DatacenterBroker#getId () @param expectedCallsToGetId the number of times the DatacenterBroker#getId () is expected to be called @return a mocked DatacenterBroker
public static DatacenterBroker createMockBroker(int brokerId, int expectedCallsToGetId) {
        final DatacenterBroker broker = EasyMock.createMock(DatacenterBroker.class);
        EasyMock.expect(broker.getId()).andReturn(brokerId).times(expectedCallsToGetId);
        EasyMock.replay(broker);
        return broker;
    }
public static DatacenterBroker createMockBroker ( int brokerId , int expectedCallsToGetId ) { final DatacenterBroker broker = EasyMock . createMock ( DatacenterBroker . class ) ; EasyMock . expect ( broker . getId ( ) ) . andReturn ( brokerId ) . times ( expectedCallsToGetId ) ; EasyMock . replay ( broker ) ; return broker ; }
Creates a mocked DatacenterBroker where the {@link DatacenterBroker#getId()}
 is expected to be called a given number of times.
Creates a mocked DatacenterBroker where the { @link DatacenterBroker#getId () } is expected to be called a given number of times .