Make testing of deprecated API optional