// Path: src/main/java/com/github/ccob/bittrex4j/listeners/Listener.java
// @FunctionalInterface
// public interface Listener<EventType> {
//     void onEvent(EventType eventType);
// }


import com.github.ccob.bittrex4j.listeners.Listener;
import org.junit.Test;
package com.github.ccob.bittrex4j;


public class ObservableTest {

    @Test(expected = IllegalArgumentException.class)
    public void shouldThrowWhenAddingNullObserver() throws Exception {
        Observable<Object> observable = new Observable<>();
        observable.addObserver(null);
    }


    @Test
    public void shouldAllowSameObserverTwice() throws Exception {
        Observable<Object> observable = new Observable<>();
// Path: src/main/java/com/github/ccob/bittrex4j/listeners/Listener.java
// @FunctionalInterface
// public interface Listener<EventType> {
//     void onEvent(EventType eventType);
// }


// Path: src/test/java/com/github/ccob/bittrex4j/ObservableTest.java
import com.github.ccob.bittrex4j.listeners.Listener;
import org.junit.Test;

package com.github.ccob.bittrex4j;


public class ObservableTest {

    @Test(expected = IllegalArgumentException.class)
    public void shouldThrowWhenAddingNullObserver() throws Exception {
        Observable<Object> observable = new Observable<>();
        observable.addObserver(null);
    }


    @Test
    public void shouldAllowSameObserverTwice() throws Exception {
        Observable<Object> observable = new Observable<>();
        Listener<Object> listener = new Listener<Object>() {