The java implementation caches this in a static variable, and the non-functional requirements indicate that repeated calls should not need to recreate the instance, re-parse files, etc. This also requires simple locking on the fetch. This is non-trivial to test. I Java I did this by putting all the static state into an internal class only visible to the tests, and this also makes the tests thread-safe if run concurrently.