testing/src/main/java/com/jraska/livedata/TestObserver.java
public <N> TestObserver<N> map(Function<T, N> mapper) {
    TestObserver<N> newObserver = create();
    // We want the history match the current one
    for (T value : valueHistory) {
      newObserver.onChanged(mapper.apply(value));
    }

    childObservers.add(value -> newObserver.onChanged(mapper.apply(value)));
    return newObserver;
  }
/**
   * Allows assertion of some mapped value extracted from originally observed values.
   * History of observed values is retained.
   * <p>
   * This can became useful when you want to perform assertions on some complex structure and
   * you want to assert only on one field.
   *
   * @param mapper Function to map originally observed value.
   * @param <N>    Type of mapper.
   * @return TestObserver for mapped value
   */
Allows assertion of some mapped value extracted from originally observed values.
History of observed values is retained.

This can became useful when you want to perform assertions on some complex structure and
you want to assert only on one field.

@param mapper Function to map originally observed value.
@param     Type of mapper.
@return TestObserver for mapped value
Allows assertion of some mapped value extracted from originally observed values . History of observed values is retained . This can became useful when you want to perform assertions on some complex structure and you want to assert only on one field . @param mapper Function to map originally observed value . @param Type of mapper . @return TestObserver for mapped value
public <N> TestObserver<N> map(Function<T, N> mapper) {
    TestObserver<N> newObserver = create();
    for (T value : valueHistory) {
      newObserver.onChanged(mapper.apply(value));
    }
    childObservers.add(value -> newObserver.onChanged(mapper.apply(value)));
    return newObserver;
  }
public < N > TestObserver < N > map ( Function < T , N > mapper ) { TestObserver < N > newObserver = create ( ) ; for ( T value : valueHistory ) { newObserver . onChanged ( mapper . apply ( value ) ) ; } childObservers . add ( value -> newObserver . onChanged ( mapper . apply ( value ) ) ) ; return newObserver ; }
Allows assertion of some mapped value extracted from originally observed values.
Allows assertion of some mapped value extracted from originally observed values .
// We want the history match the current one