package com.fluentinterface;

import com.fluentinterface.domain.Person;
import org.junit.Test;

import static com.fluentinterface.domain.PersonAnnotatedBuilder.aPerson;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;

public class BuilderWithAnnotationsTest {

    @Test
    public void testCanUseConstructorFromAnnotatedMethod() {

        Person built = aPerson().with("name", 16).build();

        assertThat(built.getName(), is("name"));
        assertThat(built.getAge(), is(16));
    }

    @Test
    public void testCanUseConverterFromSetsAnnotatedMethod() {

        Person built = aPerson().withAge("16").build();

        assertThat(built.getAge(), is(16));
    }
}

@@ -521,16 +521,352 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testAlwaysUsesLastConstructsInvocationParameterToInstantiateObject() %7B%0A%0A        Person built = aPerson()%0A                .with(%22name%22, 16)%0A                .with(%22last name%22, 99)%0A                .build();%0A%0A        assertThat(built.getName(), is(%22last name%22));%0A        assertThat(built.getAge(), is(99));%0A    %7D%0A%0A
     @Tes

Add test for multiple invocations of methods annotated with `@Constructs`