  @Test
  public void classFileIsDetectedAsClass() throws IOException {

    ByteArrayInputStream data = new ByteArrayInputStream(VALID_CLASS);

    ClassFileDetectorStream detector = new ClassFileDetectorStream("Foo.class", data);
    byte[] read = readAll(detector);

    assertThat(detector.isClass()).isTrue();
    assertThat(read).isEqualTo(VALID_CLASS);
  }