Class SystemClassUser


  • public class SystemClassUser
    extends java.lang.Object
    Class used to demonstrate PowerMock's ability to mock system classes.
    • Constructor Detail

      • SystemClassUser

        public SystemClassUser()
    • Method Detail

      • threadSleep

        public void threadSleep()
                         throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • performEncode

        public java.lang.String performEncode()
                                       throws java.io.UnsupportedEncodingException
        Throws:
        java.io.UnsupportedEncodingException
      • executeCommand

        public java.lang.Process executeCommand()
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • getSystemProperty

        public java.lang.String getSystemProperty()
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • doMoreComplicatedStuff

        public void doMoreComplicatedStuff()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • copyProperty

        public void copyProperty​(java.lang.String to,
                                 java.lang.String from)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • format

        public java.lang.String format​(java.lang.String one,
                                       java.lang.String args)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • newURL

        public java.net.URL newURL​(java.lang.String anUrl)
                            throws java.net.MalformedURLException
        Throws:
        java.net.MalformedURLException
      • newStringBuilder

        public java.lang.StringBuilder newStringBuilder()
      • shuffleCollection

        public void shuffleCollection​(java.util.List<?> list)
      • useURL

        public java.net.URLConnection useURL​(java.net.URL url)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getLocalHost

        public java.net.InetAddress getLocalHost()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • generatePerishableToken

        public java.lang.String generatePerishableToken()
      • lengthOf

        public int lengthOf​(java.lang.StringBuilder to)
      • lengthOf

        private int lengthOf​(java.lang.CharSequence to)