@Test
public void requestThrowsIllegalStateException() throws Exception {

    final String permission = "permission";
    when(permissionRequesterFragment.request(permission)).thenThrow(new IllegalStateException());
    permissionsRequester.request(permission).test()
            .assertNoValues()
            .assertNotComplete()
            .assertError(IllegalStateException.class);
}