Assuming that general relativity is the correct theory of gravity in the strongfield limit, can gravitational-wave observations distinguish between black holes and other compact object sources? Alternatively, can gravitationalwave observations provide a test of one of the fundamental predictions of general relativity: the no-hair theorem? Here we describe a definitive test of the hypothesis that observations of damped, sinusoidal gravitational waves originate from a black hole or, alternatively, that nature respects the general relativistic no-hair theorem. For astrophysical black holes, which have a negligible charge-to-mass ratio, the black-hole quasi-normal mode spectrum is characterized entirely by the black-hole mass and angular momentum and is unique to black holes. In a different theory of gravity, or if the observed radiation arises from a different source (e.g., a neutron star, strange matter or boson star), the spectrum will be inconsistent with that predicted for general relativistic black holes. We give a statistical characterization of the consistency between the noisy observation and the theoretical predictions of general relativity and a demonstration, through simulation, of the effectiveness of the test for strong sources.