// By creating this spy, the real underlying code will be called, but we'll
// be able to verify the arguments that are passed in to the method calls.
return spy(realEmailService);
} catch (IOException e) {
// We just have to catch IOException to satisfy File.getPath() interface
throw new CedarRuntimeException("Error creating partial mock: " + e.getMessage(), e);
}
}