### Question:
IdentityCompiler implements CommandCompiler { @Nonnull @Override public Set<? extends CommandCallable> compile(@Nonnull Object command) { if (!(command instanceof CommandCallable)) { throw new CommandCompilerException("Could not compile command using IdentityCompiler: Object " + command + " is not an instance of CommandCallable"); } return Collections.singleton((CommandCallable) command); }  @Nonnull @Override Set<? extends CommandCallable> compile(@Nonnull Object command);  }### Answer:
@Test void testDifferentCommandTypeRejection() { assertThrows(CommandCompilerException.class, () -> new IdentityCompiler().compile(new Object()), "IdentityCompiler does not recognise invalid Objects"); }