@Test
public void testPsubscribe() {

  BinaryJedisPubSub listener = mock(BinaryJedisPubSub.class);
  RedisFacade.RedisPubSub facadeListener = mock(RedisFacade.RedisPubSub.class);
  when(facadeListener.getLinked()).thenReturn(listener);
  String pattern = "test";
  rf.psubscribe(facadeListener, pattern);
  ArgumentCaptor<BinaryJedisPubSub> capture = ArgumentCaptor.forClass(BinaryJedisPubSub.class);
  verify(facadeListener).link(capture.capture());
  verify(jedis).psubscribe(capture.getValue(), SafeEncoder.encode(pattern));
}