title: How to create an Observable in Android?
body: <p>What I want to do is to create a simple in-memory cache just to try Observables out. However I got stuck because I don't understand how to create an observable. This is the code I have gotten so far:</p>
  
  <pre><code>public class MovieCache {
      MovieWrapper movieWrapper;
  
      public Observable&lt;MovieWrapper&gt; getMovies() {
         //How to create and return an Observable&lt;MovieWrapper&gt; here?
      }
  
      public void setCache(MovieWrapper wrapper) {
          movieWrapper = wrapper;
      }
  
      public void clearCache() {
          movieWrapper = null;
      }
  }
  </code></pre>
  
  <p>In the <code>getMovies()</code> method I want to create an Observable and return my local field movieWrapper to the subscriber. How can I do this? I tried with using <code>new Observable.just(movieWrapper)</code> but it results in a null exception.</p>