May be worth adding Assert.assertNotNull(in); to prevent null pointer exception