MethodServices { int getNumberOfNullEnderParameter(List<String> parameters) { int nbnull = 0; for (int i = parameters.size() - 1; i >= 0; i--) { String parameter = parameters.get(i); if (parameter.equals("null")) { nbnull++; } else { break; } } return nbnull; }  Method getMethodFromDataService(final Class dsClass, final MessageFromClient message, List<Object> arguments); Method getNonProxiedMethod(Class cls, String methodName, Class<?>... parameterTypes);  }
@Test public void testGetNumberOfNullEnderParameter() { System.out.println("getNumberOfNullEnderParameter"); List<String> params = Arrays.asList("", "null", "", "null", "null"); int result = instance.getNumberOfNullEnderParameter(params); assertThat(result).isEqualTo(2); params = Arrays.asList("", "null", "", "null"); result = instance.getNumberOfNullEnderParameter(params); assertThat(result).isEqualTo(1); params = Arrays.asList("", "null", ""); result = instance.getNumberOfNullEnderParameter(params); assertThat(result).isEqualTo(0); }