title: How to do an instanceof check with Scala(Test)
body: <p>I'm trying to incorporate ScalaTest into my Java project; replacing all JUnit tests with ScalaTests. At one point, I want to check if Guice's Injector injects the correct type. In Java, I have a test like this:</p>
  
  <pre><code>public class InjectorBehaviour {
      @Test
      public void shouldInjectCorrectTypes() {
          Injector injector = Guice.createInjector(new ModuleImpl());
          House house = injector.getInstance(House.class);
  
          assertTrue(house.door() instanceof WoodenDoor);
          assertTrue(house.window() instanceof BambooWindow);
          assertTrue(house.roof() instanceof SlateRoof);
      }
  }
  </code></pre>
  
  <p>But I have a problem doing the same with ScalaTest:</p>
  
  <pre><code>class InjectorSpec extends Spec {
      describe("An injector") {
          it("should inject the correct types") {
              val injector = Guice.createInjector(new ModuleImpl)
              val house = injector.getInstance(classOf[House])
  
              assert(house.door instanceof WoodenDoor)
              assert(house.window instanceof BambooWindow)
              assert(house.roof instanceof SlateRoof)
          }
      }
  }
  </code></pre>
  
  <p>It complains that the value <code>instanceof</code> is not a member of <code>Door</code>/<code>Window</code>/<code>Roof</code>. Can't I use <code>instanceof</code> that way in Scala? </p>