Improved tests for SPI class