As the utility of the neutral theory of biodiversity is increasingly being recognized, there is also an increasing need for proper tools to evaluate the relative importance of neutral processes (dispersal limitation and stochasticity). One of the key features of neutral theory is its close link to data: sampling formulas, giving the probability of a data set conditional on a set of model parameters, have been developed for parameter estimation and model comparison. However, only single local samples can be handled with the currently available sampling formulas, whereas data are often available for many small spatially separated plots. Here, I present a sampling formula for multiple, spatially separated samples from the same metacommunity, which is a generalization of earlier sampling formulas. I also provide an algorithm to generate data sets with the model and I introduce a general test of neutrality that does not require an alternative model; this test compares the probability of the observed data (calculated using the new sampling formula) with the probability of model-generated data sets. I illustrate this with tree abundance data from three large Panamanian neotropical forest plots. When the test is performed with model parameters estimated from the three plots, the model cannot be rejected; however, when parameter estimates previously reported for BCI are used, the model is strongly rejected. This suggests that neutrality cannot explain the structure of the three Panamanian tree communities on the local (BCI) and regional (Panama Canal Zone) scale simultaneously. One should be aware, however, that aspects of the model other than neutrality may be responsible for its failure. I argue that the spatially implicit character of the model is a potential candidate.