Apple gets permit to test self-driving cars in California