### Question:
ConstructorUtils { public static Class<?>[] getConstructorParameters(Class<?> type, Class<?>[] givenTypes) { next_constructor: for (Constructor<?> constructor : type.getConstructors()) { int matches = 0; Class<?>[] parameters = constructor.getParameterTypes(); Iterator<Class<?>> parameterIterator = Arrays .asList(parameters) .iterator(); if (!isEmpty(givenTypes) && !isEmpty(parameters)) { Class<?> parameter = null; for (Class<?> argument : givenTypes) { if (parameterIterator.hasNext()) { parameter = parameterIterator.next(); if (!compatible(parameter, argument)) { continue next_constructor; } matches++; } else if (constructor.isVarArgs()) { if (!compatible(parameter, argument)) { continue next_constructor; } } else { continue next_constructor; } } if (matches == parameters.length) { return parameters; } } else if (isEmpty(givenTypes) && isEmpty(parameters)) { return NO_ARGS; } } throw new ExpressionException("No constructor found for " + type.toString() + " with parameters: " + Arrays.deepToString(givenTypes)); } private  ConstructorUtils(); static Constructor<C> getConstructor(Class<C> type, Class<?>[] givenTypes); static Class<?>[] getConstructorParameters(Class<?> type, Class<?>[] givenTypes); static Iterable<Function<Object[], Object[]>> getTransformers(Constructor<?> constructor);  }### Answer:
@Test public void getDefaultConstructorParameters() { Class<?>[] args = {Long.class, String.class}; Class<?>[] expected = {Long.TYPE, String.class}; Class<?>[] constructorParameters = getConstructorParameters(ProjectionExample.class, args); assertArrayEquals("Constructorparameters not equal", expected, constructorParameters); }