The runtime code does some tracking of bean definition counts but it isn't consistent (the change resulting from loading a GroovyBeanDefinitionSource is ignored) and is only used in the tests. The tests could be changed to get the registry's bean definition count before and after a call to load, and verifying that the delta is as expected.