1 4 package com.tc.simulator.app; 5 6 public class MockApplication implements Application { 7 8 public String globalId; 9 public long waitInterval; 10 public boolean throwException; 11 public RuntimeException exception; 12 public boolean result; 13 14 public void run() { 15 try { 16 Thread.sleep(waitInterval); 17 } catch (InterruptedException e) { 18 throw new RuntimeException (e); 19 } 20 if (this.throwException) { throw exception; } 21 } 22 23 public String getApplicationId() { 24 return this.globalId; 25 } 26 27 public boolean interpretResult(Object o) { 28 return result; 29 } 30 } | Popular Tags |