We answer a question of Celikbas, Dao, and Takahashi by establishing the following characterization of Gorenstein rings: a commutative noetherian local ring $(R,mathfrak m)$ is Gorenstein if and only if it admits an integrally closed $mathfrak m$-primary ideal of finite Gorenstein dimension. This is accomplished through a detailed study of certain test complexes. Along the way we construct such a test complex that detect finiteness of Gorenstein dimension, but not that of projective dimension.