### Question:
ModelInterceptor { public static long count(@Origin Method method, @Argument(0) Filter filter) throws Throwable { return invoke(method, new Class[] {Class.class, Filter.class}, new Object[]{method.getDeclaringClass(), filter}); } private  ModelInterceptor(); static Model findById(@Origin Method method, @Argument(0) Serializable id); static boolean exists(@Origin Method method, @Argument(0) Serializable id); static Model one(@Origin Method method, @Argument(0) Object[] paramValues); static Model first(@Origin Method method, @Argument(0) Object[] paramValues); static List<Model> all(@Origin Method method); static List<Model> where(@Origin Method method, @Argument(0) Object[] paramValues); static List<Model> where(@Origin Method method, @Argument(0) Filter filter); static long count(@Origin Method method, @Argument(0) Filter filter); static long count(@Origin Method method); static void deleteAll(@Origin Method method, @Argument(0) Filter filter); static void deleteAll(@Origin Method method); static Filter filter(@Origin Method method);  }### Answer:
@Test public void shouldCallCountWithFilter() throws Throwable { DummyModel dummyModel1 = createModel(RandomStringUtils.randomAlphabetic(5), RandomStringUtils.randomAlphabetic(5)); createModel(RandomStringUtils.randomAlphabetic(5), RandomStringUtils.randomAlphabetic(5)); assertEquals(ModelInterceptor.count(DummyModel.class.getMethod("count", Filter.class), new Filter(new Condition("column1", dummyModel1.getColumn1()))), 1L); }
@Test public void shouldCallCount() throws Throwable { createModel(RandomStringUtils.randomAlphabetic(5), RandomStringUtils.randomAlphabetic(5)); createModel(RandomStringUtils.randomAlphabetic(5), RandomStringUtils.randomAlphabetic(5)); assertEquals(ModelInterceptor.count(DummyModel.class.getMethod("count")), 2L); }