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));
    }
}

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 testAlwaysUsesLastConstructsInvocationParameterToInstantiateObject() {

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

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

    @Test
    public void testCanUseConverterFromSetsAnnotatedMethod() {

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

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

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