@Test(expected = RuntimeException.class) public void failWhenClassDoesNotExist() throws ClassNotFoundException { CertificateProfileInfoValidator.validate("a.b.C"); }
public static void validate(String className) { try { new GetCertificateProfile(className).klass(); } catch (Exception e) { log.error("Error getting profile info for class '{}'", className, e); throw new RuntimeException("Certificate profile with name '" + className + "' does not exist."); } }
CertificateProfileInfoValidator { public static void validate(String className) { try { new GetCertificateProfile(className).klass(); } catch (Exception e) { log.error("Error getting profile info for class '{}'", className, e); throw new RuntimeException("Certificate profile with name '" + className + "' does not exist."); } } }
CertificateProfileInfoValidator { public static void validate(String className) { try { new GetCertificateProfile(className).klass(); } catch (Exception e) { log.error("Error getting profile info for class '{}'", className, e); throw new RuntimeException("Certificate profile with name '" + className + "' does not exist."); } } private  CertificateProfileInfoValidator(); }
CertificateProfileInfoValidator { public static void validate(String className) { try { new GetCertificateProfile(className).klass(); } catch (Exception e) { log.error("Error getting profile info for class '{}'", className, e); throw new RuntimeException("Certificate profile with name '" + className + "' does not exist."); } } private  CertificateProfileInfoValidator(); static void validate(String className); }
CertificateProfileInfoValidator { public static void validate(String className) { try { new GetCertificateProfile(className).klass(); } catch (Exception e) { log.error("Error getting profile info for class '{}'", className, e); throw new RuntimeException("Certificate profile with name '" + className + "' does not exist."); } } private  CertificateProfileInfoValidator(); static void validate(String className);  }