IntrabandProxyUtil { protected static void checkField( Field[] fields, String name, Class<?> clazz, boolean isStatic) { for (Field field : fields) { if (name.equals(field.getName())) { if ((field.getType() != clazz) || (Modifier.isStatic(field.getModifiers()) != isStatic)) { throw new IllegalArgumentException( "Field " + field + " is expected to be of type " + clazz + " and " + (!isStatic ? "not " : "") + "static"); } break; } } }  static String[] getProxyMethodSignatures(Class<?> clazz); static Class<?> getStubClass(Class<?> clazz, String skeletonId); static Class<?> getStubClass(
		ClassLoader classLoader, Class<?> clazz, String skeletonId); static T newStubInstance(
		Class<? extends T> stubClass, String id,
		RegistrationReference registrationReference,
		ExceptionHandler exceptionHandler); static final String SKELETON_POSTFIX; static final String STUB_POSTFIX; }
@Test public void testCheckField() { class TestClass { @SuppressWarnings("unused") private String _testField; } Field[] fields = TestClass.class.getDeclaredFields(); IntrabandProxyUtil.checkField( fields, "noSuchField", String.class, true); IntrabandProxyUtil.checkField( fields, "_testField", String.class, false); try { IntrabandProxyUtil.checkField( fields, "_testField", Object.class, false); Assert.fail(); } catch (IllegalArgumentException iae) { Assert.assertEquals( "Field " + fields[0] + " is expected to be of type " + Object.class + " and not static", iae.getMessage()); } try { IntrabandProxyUtil.checkField( fields, "_testField", String.class, true); Assert.fail(); } catch (IllegalArgumentException iae) { Assert.assertEquals( "Field " + fields[0] + " is expected to be of type " + String.class + " and static", iae.getMessage()); } }