@@ -0,0 +1,1529 @@
+package pl.openrest.generator.commons.utils;%0A%0Aimport org.mockito.ArgumentCaptor;%0Aimport org.mockito.Mockito;%0A%0Aimport pl.openrest.generator.commons.type.TypeFileWriter;%0A%0Aimport com.squareup.javapoet.CodeBlock;%0Aimport com.squareup.javapoet.FieldSpec;%0Aimport com.squareup.javapoet.MethodSpec;%0Aimport com.squareup.javapoet.TypeSpec;%0A%0Apublic final class JavaPoetTestUtils %7B%0A%0A    private JavaPoetTestUtils() %7B%0A        // TODO Auto-generated constructor stub%0A    %7D%0A%0A    public static MethodSpec getMethodSpec(TypeSpec spec, String methodName) %7B%0A        for (MethodSpec ms : spec.methodSpecs) %7B%0A            if (ms.name.equals(methodName)) %7B%0A                return ms;%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%0A    public static TypeSpec getTypeSpec(TypeFileWriter typeFileWriter) %7B%0A        ArgumentCaptor%3CTypeSpec%3E dtoSpecCaptor = ArgumentCaptor.forClass(TypeSpec.class);%0A        Mockito.verify(typeFileWriter).write(dtoSpecCaptor.capture(), Mockito.anyString());%0A        return dtoSpecCaptor.getValue();%0A    %7D%0A%0A    public static FieldSpec getFieldSpec(TypeSpec spec, String fieldName) %7B%0A        for (FieldSpec fs : spec.fieldSpecs) %7B%0A            if (fs.name.equals(fieldName)) %7B%0A                return fs;%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%0A    public static CodeBlock getSingleStatementCodeBlock(String statement) %7B%0A        return CodeBlock.builder().addStatement(statement).build();%0A    %7D%0A%0A    public static CodeBlock geCodeBlock(String line) %7B%0A        return CodeBlock.builder().add(line).build();%0A    %7D%0A%7D%0A

Create JavaPoetTestUtils