Used JMockit to test calls to static methods, but test could still be
improved see #96