Sure, no problem. This test uses a mockito "spy" object to inject some code right before the saveFSImage call. In some cases we want to call through to the original saveFSImage, in other cases we just want to throw an exception. For whatever reason, an incorrect change was made in
HDFS-1071 which made the "call through" case call through to the same spy object rather than the unmodified class, so of course it infinitely recursed and blew out the stack. The patch switches to using the more "proper" way of doing this in Mockito - the callRealMethod() function.