added spi test code