コード例 #1
0
  @Test
  public void testProcessExceptions_noException() throws Exception {

    Logger logger = Logger.getLogger(getClass().getName());
    List<Exception> exceptions = new ArrayList<>(0);
    InstancesMngrImpl.processExceptions(logger, exceptions, "whatever");
  }
コード例 #2
0
  @Test(expected = IOException.class)
  public void testProcessExceptions_withException() throws Exception {

    Logger logger = Logger.getLogger(getClass().getName());
    List<Exception> exceptions = new ArrayList<>(1);
    exceptions.add(new Exception("oops"));

    InstancesMngrImpl.processExceptions(logger, exceptions, "whatever");
  }