### Question:
AllureAspectUtils { public static String getName(String methodName, Object[] parameters) { int maxLength = AllureConfig.newInstance().getMaxTitleLength(); if (methodName.length() > maxLength) { return cutBegin(methodName, maxLength); } else { return methodName + getParametersAsString(parameters, maxLength - methodName.length()); } } private  AllureAspectUtils(); static String getName(String methodName, Object[] parameters); static String getParametersAsString(Object[] parameters, int maxLength); static String getTitle(String namePattern, String methodName, Object instance, Object[] parameters); static Object arrayToString(Object obj); static String cutEnd(String data, int maxLength); static String cutBegin(String data, int maxLength);  }### Answer:
@Test public void getNameLongMethodNameTest() throws Exception { String name = getName(TOO_LONG_NAME, null); assertThat("Invalid method name short cut", name, equalTo("... 150 symbols! Guys, what are you thinking for when you made so long title??? Could" + " you please made it more carefully...?")); }
@Test public void getNameLongMethodNameAndParametersTest() throws Exception { String name = getName(METHOD_NAME, new Object[]{TOO_LONG_NAME}); assertThat("Invalid method name short cut", name, equalTo("getSomethingNew[this name pattern is too long, over 150 symbols! Guys, what are you " + "thinking for when you made so long t...]")); }