class_docstr: Unit tests specific to retry decorator.
class_docstr_tok: ["Unit","tests","specific","to","retry","decorator","."]
docstr: Test that docorated function receives only expected args and
  that it returns the expected value on success.
docstr_tok: ["Test","that","docorated","function","receives","only","expected","args","and","that","it","returns","the","expected","value","on","success","."]
code: def testReturnsExpectedWithExpectedArgs(self, mockTime, mockSleep):
      """Test that docorated function receives only expected args and
      that it returns the expected value on success."""
  
      self.mockSleepTime(mockTime, mockSleep)
  
      retryDecorator = decorators.retry(
          timeoutSec=30, initialRetryDelaySec=2, maxRetryDelaySec=10
      )
  
      testFunction = Mock(
          return_value=321, __name__="testFunction", autospec=True
      )
  
      returnValue = retryDecorator(testFunction)(1, 2, a=3, b=4)
  
      self.assertEqual(returnValue, 321)
      testFunction.assert_called_once_with(1, 2, a=3, b=4)
  
imports: from mock import patch, call, Mock
  from nupic.support.unittesthelpers.testcasebase import unittest
  from nupic.support import decorators
label_desc: Use image node_id 7 for calling the RetryDecoratorTest obj's underlying member method code with example usage: obj.testReturnsExpectedWithExpectedArgs(mockTime, mockSleep) without return types