Update batteries and tests to latest upstream API