Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1511#discussion_r78647513 --- Diff: server/test/org/apache/cloudstack/network/lb/CertServiceTest.java --- @@ -726,17 +729,17 @@ public void runDeleteSslCertInvalidId() throws NoSuchFieldException, IllegalAcce when(certService._lbCertDao.listByCertId(anyLong())).thenReturn(null); //creating the command - DeleteSslCertCmd deleteCmd = new DeleteSslCertCmdExtn(); - Class<?> _class = deleteCmd.getClass().getSuperclass(); + final DeleteSslCertCmd deleteCmd = new DeleteSslCertCmdExtn(); + final Class<?> klazz = deleteCmd.getClass().getSuperclass(); - Field certField = _class.getDeclaredField("id"); + final Field certField = klazz.getDeclaredField("id"); certField.setAccessible(true); certField.set(deleteCmd, certId); try { certService.deleteSslCert(deleteCmd); fail("Delete with an invalid ID should fail"); - } catch (Exception e) { + } catch (final Exception e) { assertTrue(e.getMessage().contains("Invalid certificate id")); } --- End diff -- Please consider replacing this `try` block with `expected` on the `@Test` annotation
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---