private static boolean hasCause(Exception ex, Class<? extends Throwable> c) {
        Throwable cause = ex.getCause();
        
        while (cause != null) {
            if (c.equals(cause.getClass())) {
                return true;
            }
            cause = cause.getCause();
        }
        
        return false;
    }
Test of latestVersion method, of class VersionComponentImpl.
tool-parent/tool-core/src/test/java/com/speedment/tool/core/internal/component/VersionComponentImplTest.java