1. A method of generating a testbench for a representation of a device to be incorporated in a data processing apparatus, the testbench providing a test environment that represents one or more components of the data processing apparatus with which that device is to be coupled, the representation of the device being configurable based on configuration data specifying predetermined attributes of the one or more components, the method comprising the steps of: (a) receiving the configuration data used to configure the representation of the device; and (b) generating the testbench with reference to the configuration data and a first set of templates defining the test environment.