### Question:
SuBinary { @NonNull public Type getType() { return type; } SuBinary(Type type, @Nullable String path, @Nullable String version, @Nullable String extra, List<String> raw); @NonNull Type getType(); @Nullable String getPath(); String getExtra(); @Nullable String getVersion(); List<String> getRaw(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testCall_normal() { when(session.submit(any(Cmd.class))).thenAnswer(invocation -> Single.just(new Cmd.Result(invocation.getArgument(0), Cmd.ExitCode.OK))); final SuBinary suBinary = new SuBinary.Builder().session(session).build().blockingGet(); assertThat(suBinary.getType(), is(SuBinary.Type.UNKNOWN)); }
@Test public void testCall_fallback() { when(session.submit(any(Cmd.class))).thenAnswer(invocation -> { Cmd cmd = invocation.getArgument(0); if (cmd.getCommands().size() == 1) { return Single.just(new Cmd.Result(invocation.getArgument(0), Cmd.ExitCode.PROBLEM)); } else { return Single.just(new Cmd.Result(invocation.getArgument(0), Cmd.ExitCode.OK)); } }); final SuBinary suBinary = new SuBinary.Builder().session(session).build().blockingGet(); assertThat(suBinary.getType(), is(SuBinary.Type.UNKNOWN)); }