@Test public void imageShouldEqualResourceDrawable() throws Exception { ImageView image = (ImageView) activity.findViewById( R.id.sun_earth_image ); assertThat( image.getDrawable(), equalTo( getResourceDrawable( R.drawable.sun_earth ) ) ); }