Make method public to support testing.