@Test
public void testGetDrawableWhenTypeIsReference() {

    TypedArray typedArray = mock(TypedArray.class);
    TypedValue typedValue = spy(new TypedValue());
    typedValue.type = TypedValue.TYPE_REFERENCE;
    when(typedArray.peekValue(anyInt())).thenReturn(typedValue);
    ThemeUtil.getDrawable(getApplicationContext(), typedArray, anyInt());
    verify(typedArray).getDrawable(anyInt());
}