### Question:
UZRestClientGetLinkPlay { public static <S> S createService(Class<S> serviceClass) { if (retrofit == null) { throw new IllegalStateException("Must call init() before use"); } return retrofit.create(serviceClass); }  static void init(String baseApiUrl); static void init(String baseApiUrl, String token); static Retrofit getRetrofit(); static S createService(Class<S> serviceClass); static void addHeader(String name, String value); static void addAuthorization(String token); static void removeAuthorization(); static void removeHeader(String name); static boolean hasHeader(String name);  }### Answer:
@Test public void create_service_without_init_failed() { PowerMockito.when(TextUtils.isEmpty(anyString())).thenReturn(false); try { UZRestClientGetLinkPlay.createService(UZService.class); } catch (Exception e) { assertTrue(e instanceof IllegalStateException); assertEquals(e.getMessage(), "Must call init() before use"); } }