// Path: RxPractice/app/src/main/java/ru/samples/itis/rxpractice/tasks/RxJavaTask2.java
// public class RxJavaTask2 {
// 
//     /**
//      * TODO : implement this method
//      *
//      * Take the range of integers [1..100000] and apply next functions:
//      * 1) Multiply all elements by 2
//      * 2) Remove 40 000 elements from start and 40 000 elements from end
//      * 3) Remove all values which is not divided by 3
//      * 4) Transform the left sequence of integers into sequence of BigInteger objects
//      * 5) Multiply all values into single BigInteger object
//      * 6) Cache the result
//      *
//      * @return observable with cached result of single BigInteger object
//      */
//     @NonNull
//     public static Observable<BigInteger> task2Observable() {
//         throw new RuntimeException("Observable not implemented exception");
//     }
// 
// }


import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import java.math.BigInteger;
import java.util.concurrent.atomic.AtomicLong;
import ru.samples.itis.rxpractice.tasks.RxJavaTask2;
import rx.Observable;
import rx.Subscriber;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
package ru.samples.itis.rxpractice;





/**
 * @author Artur Vasilov
 */
@RunWith(JUnit4.class)
public class Task2Test {

    private BigInteger expectedResult;

    @Before
    public void setUp() throws Exception {
        BigInteger result = BigInteger.ONE;
        for (int value = 80_002; value <= 120_000; value += 2) {
            if (value % 3 == 0) {
                result = result.multiply(BigInteger.valueOf(value));
            }
        }
        expectedResult = result;
    }

    @Test
    public void testNotNull() throws Exception {
// Path: RxPractice/app/src/main/java/ru/samples/itis/rxpractice/tasks/RxJavaTask2.java
// public class RxJavaTask2 {
// 
//     /**
//      * TODO : implement this method
//      *
//      * Take the range of integers [1..100000] and apply next functions:
//      * 1) Multiply all elements by 2
//      * 2) Remove 40 000 elements from start and 40 000 elements from end
//      * 3) Remove all values which is not divided by 3
//      * 4) Transform the left sequence of integers into sequence of BigInteger objects
//      * 5) Multiply all values into single BigInteger object
//      * 6) Cache the result
//      *
//      * @return observable with cached result of single BigInteger object
//      */
//     @NonNull
//     public static Observable<BigInteger> task2Observable() {
//         throw new RuntimeException("Observable not implemented exception");
//     }
// 
// }


// Path: RxPractice/app/src/test/java/ru/samples/itis/rxpractice/Task2Test.java
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import java.math.BigInteger;
import java.util.concurrent.atomic.AtomicLong;
import ru.samples.itis.rxpractice.tasks.RxJavaTask2;
import rx.Observable;
import rx.Subscriber;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;

package ru.samples.itis.rxpractice;





/**
 * @author Artur Vasilov
 */
@RunWith(JUnit4.class)
public class Task2Test {

    private BigInteger expectedResult;

    @Before
    public void setUp() throws Exception {
        BigInteger result = BigInteger.ONE;
        for (int value = 80_002; value <= 120_000; value += 2) {
            if (value % 3 == 0) {
                result = result.multiply(BigInteger.valueOf(value));
            }
        }
        expectedResult = result;
    }

    @Test
    public void testNotNull() throws Exception {
        Observable<BigInteger> observable = RxJavaTask2.task2Observable();