@Test public void testRotateCleartext_shouldThrowExceptionIfExistingKeysetIsEmpty() throws Exception { InputStream emptyStream = new ByteArrayInputStream(new byte[0]); String masterKeyUri = null; String credentialPath = null; ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); try { RotateKeysetCommand.rotate( outputStream, OUTPUT_FORMAT, emptyStream, INPUT_FORMAT, masterKeyUri, credentialPath, NEW_TEMPLATE); fail("Expected IOException"); } catch (IOException e) { } }
public static void rotate(OutputStream outputStream, String outFormat, InputStream inputStream, String inFormat, String masterKeyUri, String credentialPath, KeyTemplate keyTemplate) throws Exception { TinkeyUtil.createKey(TinkeyUtil.CommandType.ROTATE_KEYSET, outputStream, outFormat, inputStream, inFormat, masterKeyUri, credentialPath, keyTemplate); }
RotateKeysetCommand extends AddRotateOptions implements Command { public static void rotate(OutputStream outputStream, String outFormat, InputStream inputStream, String inFormat, String masterKeyUri, String credentialPath, KeyTemplate keyTemplate) throws Exception { TinkeyUtil.createKey(TinkeyUtil.CommandType.ROTATE_KEYSET, outputStream, outFormat, inputStream, inFormat, masterKeyUri, credentialPath, keyTemplate); } }
RotateKeysetCommand extends AddRotateOptions implements Command { public static void rotate(OutputStream outputStream, String outFormat, InputStream inputStream, String inFormat, String masterKeyUri, String credentialPath, KeyTemplate keyTemplate) throws Exception { TinkeyUtil.createKey(TinkeyUtil.CommandType.ROTATE_KEYSET, outputStream, outFormat, inputStream, inFormat, masterKeyUri, credentialPath, keyTemplate); }  }
RotateKeysetCommand extends AddRotateOptions implements Command { public static void rotate(OutputStream outputStream, String outFormat, InputStream inputStream, String inFormat, String masterKeyUri, String credentialPath, KeyTemplate keyTemplate) throws Exception { TinkeyUtil.createKey(TinkeyUtil.CommandType.ROTATE_KEYSET, outputStream, outFormat, inputStream, inFormat, masterKeyUri, credentialPath, keyTemplate); }  @Override void run(); static void rotate(OutputStream outputStream, String outFormat,
      InputStream inputStream, String inFormat,
      String masterKeyUri, String credentialPath,
      KeyTemplate keyTemplate); }
RotateKeysetCommand extends AddRotateOptions implements Command { public static void rotate(OutputStream outputStream, String outFormat, InputStream inputStream, String inFormat, String masterKeyUri, String credentialPath, KeyTemplate keyTemplate) throws Exception { TinkeyUtil.createKey(TinkeyUtil.CommandType.ROTATE_KEYSET, outputStream, outFormat, inputStream, inFormat, masterKeyUri, credentialPath, keyTemplate); }  @Override void run(); static void rotate(OutputStream outputStream, String outFormat,
      InputStream inputStream, String inFormat,
      String masterKeyUri, String credentialPath,
      KeyTemplate keyTemplate);  }