@@ -0,0 +1,2195 @@
+package es.sandbox.spikes.java8.lambda;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A/**%0A * Created by jeslopalo on 29/12/15.%0A */%0A%0Apublic class LambdaSpecs %7B%0A%0A    private static final String%5B%5D ARRAY_OF_STRINGS = new String%5B%5D%7B%22a%22, %22b%22, %22c%22%7D;%0A%0A    private StringBuilder result;%0A%0A    @Before%0A    public void setup() %7B%0A        this.result = new StringBuilder();%0A    %7D%0A%0A    private void assertThatTheResultIs(String expected) %7B%0A        assertThat(this.result.toString()).isEqualTo(expected);%0A    %7D%0A%0A    @Test%0A    public void the_arrow_is_the_body_separator() %7B%0A        Arrays.asList(ARRAY_OF_STRINGS)%0A                .forEach((String e) -%3E this.result.append(e));%0A%0A        assertThatTheResultIs(%22abc%22);%0A    %7D%0A%0A    @Test%0A    public void the_argument_type_can_be_inferred() %7B%0A        Arrays.asList(ARRAY_OF_STRINGS)%0A                .forEach(e -%3E this.result.append(e));%0A%0A        assertThatTheResultIs(%22abc%22);%0A    %7D%0A%0A    @Test%0A    public void complex_bodies_can_be_wrapped_into_curly_brackets() %7B%0A        Arrays.asList(ARRAY_OF_STRINGS)%0A                .forEach(e -%3E %7B%0A                    final String upper = e.toUpperCase();%0A                    this.result.append(upper);%0A                %7D);%0A%0A        assertThatTheResultIs(%22ABC%22);%0A    %7D%0A%0A    @Test%0A    public void it_may_reference_to_local_variables() %7B%0A        final String separator = %22,%22;%0A%0A        Arrays.asList(ARRAY_OF_STRINGS)%0A                .forEach(e -%3E this.result.append(e).append(separator));%0A%0A        assertThatTheResultIs(%22a,b,c,%22);%0A    %7D%0A%0A    @Test%0A    public void it_may_return_a_value() %7B%0A        final List%3CString%3E elements = Arrays.asList(%22c%22, %22a%22, %22b%22);%0A%0A        elements.sort((e1, e2) -%3E %7B%0A            int result = e1.compareTo(e2);%0A            return result;%0A        %7D);%0A%0A        assertThat(elements).containsExactly(%22a%22, %22b%22, %22c%22);%0A    %7D%0A%0A    @Test%0A    public void return_statements_is_not_required_if_body_is_oneliner() %7B%0A        final List%3CString%3E elements = Arrays.asList(%22c%22, %22a%22, %22b%22);%0A%0A        elements.sort((e1, e2) -%3E e1.compareTo(e2));%0A%0A        assertThat(elements).containsExactly(%22a%22, %22b%22, %22c%22);%0A    %7D%0A%7D%0A

Add Lambda tests for general specs