package net.sf.expectit.java8;

import java.io.IOException;
import net.sf.expectit.Expect;
import net.sf.expectit.ExpectBuilder;
import net.sf.expectit.Result;
import net.sf.expectit.matcher.SimpleResult;

/**
 * An example of using a lambda as a matcher.
 */
public class Java8Example {
    public static void main(String[] args) throws IOException {
        try (final Expect expect = new ExpectBuilder()
                .withInputs(System.in)
                .build()) {
            Result result = expect.expect((input, isEof) -> SimpleResult.valueOf(isEof, input, ""));
            System.out.println(result.getBefore());
        }
    }
}

@@ -25,16 +25,796 @@
 java8;%0A%0A
+/*%0A * #%25L%0A * ExpectIt%0A * %25%25%0A * Copyright (C) 2014 Alexey Gavrilov and contributors%0A * %25%25%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A *      http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * #L%25%0A */%0A%0Aimport static net.sf.expectit.matcher.SimpleResult.failure;%0Aimport static net.sf.expectit.matcher.SimpleResult.success;%0A%0A
 import j
@@ -936,53 +936,8 @@
 ult;
-%0Aimport net.sf.expectit.matcher.SimpleResult;
 %0A%0A/*
@@ -1266,45 +1266,97 @@
  -%3E 
-SimpleResult.valueOf(isEof, input, %22%22
+isEof%0A                    ? success(input, input, %22%22)%0A                    : failure(input
 ));%0A

Fix Java 8 build