Possible meanings are 1) the writer uses the word "heavens" to refer to the angels who live there or 2) the writer speaks of "the heavens" as if they are a person who testifies about God's righteousness. (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-personification]])