public void testGetFormat(){
  byte[] key=new byte[]{1,2,3,4,5};
  String algorithm="Algorithm";
  SecretKeySpec ks=new SecretKeySpec(key,algorithm);
  assertTrue("The returned value is not \"RAW\".",ks.getFormat() == "RAW");
}

public void testGetFormat ( ) { byte [ ] key = new byte [ ] { 1 , 2 , 3 , 4 , 5 } ; String algorithm = "Algorithm" ; SecretKeySpec ks = new SecretKeySpec ( key , algorithm ) ; assertTrue ( "The returned value is not \"RAW\"." , ks . getFormat ( ) == "RAW" ) ; }
getformat ( ) method testing . tests that returned value is " raw " .
