DataServiceVisitorJsBuilder extends AbstractDataServiceVisitor { String getMethodName(ExecutableElement methodElement) { return methodElement.getSimpleName().toString(); } DataServiceVisitorJsBuilder(ProcessingEnvironment environment, FwkWriter fwk);   }
@Test public void testGetMethodName() { System.out.println("getMethodName"); ExecutableElement executableElement = mock(ExecutableElement.class); Name name = mock(Name.class); String expectResult = "METHODNAME"; when(executableElement.getSimpleName()).thenReturn(name); when(name.toString()).thenReturn(expectResult); String result = instance.getMethodName(executableElement); assertThat(result).isEqualTo(expectResult); }