Wave
  1. Wave
  2. WAVE-298

Wave doesn't compile: error: no suitable method found for thenReturn(StringTokenizer)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.1
    • Fix Version/s: None
    • Component/s: Server
    • Labels:
      None
    • Environment:
      Tested on Debian/unstable with Java 6 and Java 7, and on Ubuntu 11.10.

      Description

      $ ant
      [...]
      compile-tests:
      [javac] Compiling 380 source files to /home/tal/src/wave/build/test
      [javac] /home/tal/src/wave/test/org/waveprotocol/box/server/robots/active/ActiveApiServletTest.java:99: error: no suitable method found for thenReturn(StringTokenizer)
      [javac] when(req.getHeaderNames()).thenReturn(new StringTokenizer("Authorization"));
      [javac] ^
      [javac] method OngoingStubbing.thenReturn(Enumeration<String>) is not applicable
      [javac] (actual argument StringTokenizer cannot be converted to Enumeration<String> by method invocation conversion)
      [javac] method OngoingStubbing.thenReturn(Enumeration<String>,Enumeration<String>...) is not applicable
      [javac] (actual argument StringTokenizer cannot be converted to Enumeration<String> by method invocation conversion)
      [javac] /home/tal/src/wave/test/org/waveprotocol/box/server/robots/active/ActiveApiServletTest.java:112: error: no suitable method found for thenReturn(StringTokenizer)
      [javac] when(req.getHeaders("Authorization")).thenReturn(generateOAuthHeader(ROBOT.getAddress()));

      There are no Sub-Tasks for this issue.

        Activity

          People

          • Assignee:
            Yuri Zelikov
            Reporter:
            Thomas Leonard
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development