2 * Copyright 2016 Huawei Technologies Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.adapter.impl;
18 import java.io.ByteArrayInputStream;
19 import java.io.ByteArrayOutputStream;
20 import java.io.IOException;
21 import java.io.InputStream;
22 import java.io.ObjectOutputStream;
23 import java.io.OutputStream;
25 public class ProcessMockImpl extends Process {
28 public OutputStream getOutputStream() {
29 // TODO Auto-generated method stub
34 public InputStream getInputStream() {
35 // TODO Auto-generated method stub
36 ByteArrayOutputStream baos = new ByteArrayOutputStream();
37 ObjectOutputStream oos;
39 oos = new ObjectOutputStream(baos);
40 oos.writeObject(new Object());
43 } catch (IOException e1) {
44 // TODO Auto-generated catch block
48 InputStream is = new ByteArrayInputStream(baos.toByteArray());
53 public InputStream getErrorStream() {
54 // TODO Auto-generated method stub
59 public int waitFor() throws InterruptedException {
60 // TODO Auto-generated method stub
65 public int exitValue() {
66 // TODO Auto-generated method stub
71 public void destroy() {
72 // TODO Auto-generated method stub