### Question:
AnnotatedDaoInvoker implements DaoInvoker { public void flush() { final FlushMethod method = daoRuntimeInfo.getFlushMethod(); assertMethod(method, Flush.class); method.invoke(dao); } AnnotatedDaoInvoker(final Object dao, final AnnotatedDaoRuntimeInfo daoRuntimeInfo); void flush(); Object update(final Object entity); Object update(String name, Object entity); Object insert(final Object entity); Object insert(String name, Object entity); Object delete(final Object entity); Object delete(String name, Object entity); Object lookupByQuery(final String query, final Object ... parameters); Object lookupByQuery(final String query, final Map<String, ?> parameters); Object lookup(final String name, final Map<String, ?> parameters); Object lookup(final String name, final Object ... parameters);  }### Answer:
@Test public void test_flush() { DaoInvoker invoker = new AnnotatedDaoInvoker(fullDao, fullDaoRuntimeInfo); invoker.flush(); verify(fullDao).flushIt(); }
@Test(groups = "unit", expectedExceptions = NoMethodWithAnnotationFoundException.class) public void test_flush_no_annotation() { DaoInvoker invoker = new AnnotatedDaoInvoker(minimumDao, minimumDaoRuntimeInfo); invoker.flush(); }