ParamUtils { public static boolean hasDefaultParams(List<? extends FormalParameter> formalParameters) { return formalParameters.stream().filter((p)->p.hasDefaultValue()).findFirst().isPresent(); } private  ParamUtils(); static boolean verifyOrder(List<ActualParam> actualParams); static List<ActualParam> unnamedParams(List<ActualParam> actualParams); static List<ActualParam> namedParams(List<ActualParam> actualParams); static boolean hasDefaultParams(List<? extends FormalParameter> formalParameters); static Either<String, List<ActualParam>> desugarizeAsteriskParam(List<? extends FormalParameter> formalParameters, Expression value, SymbolResolver resolver, Node parent); static String getterName(FormalParameter formalParameter, SymbolResolver resolver);  }
@Test public void testhasDefaultParams() { assertEquals(false, hasDefaultParams(ImmutableList.of())); assertEquals(false, hasDefaultParams(ImmutableList.of(fn1, fn2))); assertEquals(true, hasDefaultParams(ImmutableList.of(fn1, fd1, fn2))); assertEquals(true, hasDefaultParams(ImmutableList.of(fd1, fn1, fn2))); assertEquals(true, hasDefaultParams(ImmutableList.of(fn1, fn2, fd1))); }