title: What bytes to use in String initialization with data using utf16BigEndian to return nil?
body: <p>I know that <code>String(data:encoding:)</code> is a failable initializer. 
  I have created a function which accepts data as parameter and throws error if a string cannot be created from the data using encoding as utf16BigEndian. It is as below:</p>
  
  <pre><code>func createUTF16BEString(data: Data) throws -&gt; String {
      guard let string = String(data: data, encoding: .utf16BigEndian) else {
          throw NSError(domain:"MyAppDomain", code: 33, userInfo: nil)
      }
      return string
  }
  </code></pre>
  
  <p>I am writing tests for this function to cover the possibilities of success as well as failure(where an error is thrown). </p>
  
  <p>I have a limited understanding of the encodings for now. </p>
  
  <p>I have written tests which work for successful return of a string.</p>
  
  <p>My problem is what data to pass in(or say bytes) so my tests cover the case where an error would be thrown by my <code>func createUTF16BEString(data:)</code> as a result of <code>String(data:encoding:)</code> returning nil.</p>
  
  <p>Please suggests me what data should be passed or enhance my knowledge about encodings(so I could figure the bytes) to cover the test mentioned above.</p>