SystemFollowProfile implements StateProfile { @Override public void onCommandFromHandler(Command command) { callback.sendCommand(command); } SystemFollowProfile(ProfileCallback callback); @Override ProfileTypeUID getProfileTypeUID(); @Override void onStateUpdateFromItem(State state); @Override void onCommandFromHandler(Command command); @Override void onCommandFromItem(Command command); @Override void onStateUpdateFromHandler(State state);  }
@Test public void testPostCommand() { SystemFollowProfile profile = new SystemFollowProfile(mockCallback); profile.onCommandFromHandler(OnOffType.ON); verify(mockCallback).sendCommand(eq(OnOffType.ON)); verifyNoMoreInteractions(mockCallback); }