### Question:
MethodAntn { @SuppressWarnings("unchecked") static Class<? extends Throwable>[] parseThrowableArray(String array) { List<Class<? extends Throwable>> result = new ArrayList<>(); StringTokenizer tokenizer = new StringTokenizer(array, "{}, \t\n\r", false); while (tokenizer.hasMoreTokens()) { try { String className = tokenizer.nextToken(); if (className.endsWith(".class")) { className = className.substring(0, className.length() - ".class".length()); } result.add((Class<? extends Throwable>) Class.forName(className)); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } return (Class<? extends Throwable>[]) result.toArray(new Class[0]); } MethodAntn(Class<?> beanClass, Method method); final LookupResult<A> lookupAnnotation(Class<A> annotClass); abstract void validate(); @SuppressWarnings("unchecked") Class<? extends Annotation> annotationType();  }### Answer:
@Test void testParseArray() { assertThat( MethodAntn.parseThrowableArray("{ java.lang.Throwable, " + " java.lang.Exception, " + " java.lang.RuntimeException }"), is(new Class[]{Throwable.class, Exception.class, RuntimeException.class})); }
@Test void testParseArrayClassSuffix() { assertThat( MethodAntn.parseThrowableArray("{ java.lang.Throwable.class, " + " java.lang.Exception.class, " + " java.lang.RuntimeException.class }"), is(new Class[]{Throwable.class, Exception.class, RuntimeException.class})); }
@Test void testParseArrayEmpty() { assertThat( MethodAntn.parseThrowableArray("{ }"), is(new Class[]{})); }
@Test void testParseArrayError() { assertThrows(RuntimeException.class, () -> MethodAntn.parseThrowableArray("{ Foo.class }")); assertThrows(RuntimeException.class, () -> MethodAntn.parseThrowableArray("[ Foo.class ]")); }