The most likely reason - without examining your Singleton code - is that initialization does not allow some external configuration to be loaded and therefore fails.
Singlets in tests of an automatic device can be a problem, because sometimes you like that they behave differently for the particular scenario that you are testing (for example, you want one scenario where generateId returns -1, the other when it returns 4354353 and the other, when he throws a RuntimeException so that you can see how the code using Singleton RuntimeException is recommended to change the design in such cases, since the singletones are not the preferred design patterns and are somewhat considered as anti-shablo us.
source share