### Question:
LoggerNameBuilder { public String build(MethodInvocation invocation) { return build(invocation.getMethod()); } private  LoggerNameBuilder(); static LoggerNameBuilder getInstance(); String build(MethodInvocation invocation); String build(Method method); String buildByInvoker();  }### Answer:
@Test public void build() throws NoSuchMethodException { Method method = LoggerNameBuilderTest.class.getMethod("build"); MethodInvocation invocation = mock(MethodInvocation.class); when(invocation.getMethod()).thenReturn(method); String name = loggerNameBuilder.build(invocation); assertThat(name, is("ru.tinkoff.eclair.core.LoggerNameBuilderTest.build")); }
@Test public void buildNested() throws NoSuchMethodException { Method method = Nested.class.getMethod("method"); MethodInvocation invocation = mock(MethodInvocation.class); when(invocation.getMethod()).thenReturn(method); String name = loggerNameBuilder.build(invocation); assertThat(name, is("ru.tinkoff.eclair.core.LoggerNameBuilderTest$Nested.method")); }