// Path: awex-core/src/main/java/com/raycoarana/awex/transform/Filter.java
// public interface Filter<T> {
//     boolean filter(T value);
// }


import com.raycoarana.awex.transform.Filter;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

        mPromise.resolve(1);

        assertEquals(Promise.STATE_REJECTED, mFilteredValue.getState());
    }

    @Test
    public void shouldNotFilterAResolvedPromiseWithSingleValue() throws Exception {
        setUpAwex();

        mPromise = new AwexPromise<>(mAwex, mTask);

        mFilteredValue = mPromise.filterSingle(new Filter<Integer>() {
            @Override
            public boolean filter(Integer value) {
                return value == 1;
            }
        });

        mPromise.resolve(1);

        assertEquals(1, (int) mFilteredValue.getResult());
    }

    @Test
    public void shouldRejectFilteredPromise() {
        setUpAwex();

        mPromise = new AwexPromise<>(mAwex, mTask);

// Path: awex-core/src/main/java/com/raycoarana/awex/transform/Filter.java
// public interface Filter<T> {
//     boolean filter(T value);
// }


// Path: awex-core/src/test/java/com/raycoarana/awex/FilterTransformerPromiseTest.java
import com.raycoarana.awex.transform.Filter;
import org.junit.Test;
import static org.junit.Assert.assertEquals;


        mPromise.resolve(1);

        assertEquals(Promise.STATE_REJECTED, mFilteredValue.getState());
    }

    @Test
    public void shouldNotFilterAResolvedPromiseWithSingleValue() throws Exception {
        setUpAwex();

        mPromise = new AwexPromise<>(mAwex, mTask);

        mFilteredValue = mPromise.filterSingle(new Filter<Integer>() {
            @Override
            public boolean filter(Integer value) {
                return value == 1;
            }
        });

        mPromise.resolve(1);

        assertEquals(1, (int) mFilteredValue.getResult());
    }

    @Test
    public void shouldRejectFilteredPromise() {
        setUpAwex();

        mPromise = new AwexPromise<>(mAwex, mTask);

        mFilteredValue = mPromise.filterSingle(new Filter<Integer>() {