Explain what this code and these tests are for