### Question:
Flow { @NonNull public static Flow get(@NonNull View view) { return get(view.getContext()); } Flow(KeyManager keyManager, History history); @NonNull static Flow get(@NonNull View view); @NonNull static Flow get(@NonNull Context context); @Nullable static T getKey(@NonNull Context context); @Nullable static T getKey(@NonNull View view); @Nullable static T getService(@NonNull String serviceName, @NonNull Context context); @Nullable static T getService(@NonNull String serviceName, @NonNull View view); @NonNull static Installer configure(@NonNull Context baseContext, @NonNull Activity activity); static void addHistory(@NonNull Intent intent, @NonNull History history,
      @NonNull KeyParceler parceler); @CheckResult static boolean onNewIntent(@NonNull Intent intent,
      @NonNull Activity activity); @NonNull History getHistory(); void setDispatcher(@NonNull Dispatcher dispatcher); void setHistoryFilter(@NonNull HistoryFilter historyFilter); void removeDispatcher(@NonNull Dispatcher dispatcher); void setHistory(@NonNull final History history, @NonNull final Direction direction); void replaceHistory(@NonNull final Object key, @NonNull final Direction direction); void replaceTop(@NonNull final Object key, @NonNull final Direction direction); void set(@NonNull final Object newTopKey); @CheckResult boolean goBack();  }### Answer:
@Test public void incorrectFlowGetUsage() { Context mockContext = Mockito.mock(Context.class); Mockito.when(mockContext.getSystemService(Mockito.anyString())).thenReturn(null); try { Flow.get(mockContext); fail("Flow was supposed to throw an exception on wrong usage"); } catch (IllegalStateException ignored) { } }