Fix gvnfm juju compile problem
[vfc/nfvo/driver/vnfm/gvnfm.git] / juju / juju-vnfmadapter / Juju-vnfmadapterService / service / src / test / java / org / onap / vfc / nfvo / vnfm / gvnfm / jujuvnfmadapter / service / adapter / impl / ProcessMockImpl.java
1 /*
2  * Copyright 2016 Huawei Technologies Co., Ltd.
3  *
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 package org.onap.vfc.nfvo.vnfm.gvnfm.jujuvnfmadapter.service.adapter.impl;
17
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;
24
25 public class ProcessMockImpl extends Process  {
26
27         @Override
28         public OutputStream getOutputStream() {
29                 // TODO Auto-generated method stub
30                 return null;
31         }
32
33         @Override
34         public InputStream getInputStream() {
35                 // TODO Auto-generated method stub
36                 ByteArrayOutputStream baos = new ByteArrayOutputStream();
37             ObjectOutputStream oos;
38                 /*try {
39                         oos = new ObjectOutputStream(baos);
40                         oos.writeObject(new Object());
41                         oos.flush();
42                     oos.close();
43                 } catch (IOException e1) {
44                         // TODO Auto-generated catch block
45                         e1.printStackTrace();
46                 }*/
47
48             InputStream is = new ByteArrayInputStream(baos.toByteArray());
49                 return is;
50         }
51
52         @Override
53         public InputStream getErrorStream() {
54                 // TODO Auto-generated method stub
55                 return null;
56         }
57
58         @Override
59         public int waitFor() throws InterruptedException {
60                 // TODO Auto-generated method stub
61                 return 0;
62         }
63
64         @Override
65         public int exitValue() {
66                 // TODO Auto-generated method stub
67                 return 0;
68         }
69
70         @Override
71         public void destroy() {
72                 // TODO Auto-generated method stub
73                 
74         }
75
76 }