source: class CtMethodJavaWriterTest {
  
       CtMethodJavaWriter signatureExtractor;
  
      @Test
      public void testExtractSignature_with_params() throws CannotCompileException, NotFoundException {
  
target:         //GIVEN
          CtClass targetClass = ClassPool.getDefault().makeClass(
                  "Target" + TestCounter.testCounter++);
          CtMethod fooMethod = CtNewMethod.make("public void foo(int a, String b) {}", targetClass);
          targetClass.addMethod(fooMethod);
  
          //WHEN
          String extractSignature = signatureExtractor.createJavaSignature(fooMethod);
  
          //THEN
          assertEquals("public void foo(int p0, java.lang.String p1)", extractSignature);
      }
  
  }