PropertyDelegator extends BaseDelegator implements IPropertyDelegator { @Override public List<IProperty> getProperty(final GetPropertyOptions opts) throws P4JavaException { List<Map<String, Object>> resultMaps = execMapCmdList(PROPERTY, processParameters(opts, null, new String[]{"-l"}, server), null); return buildNonNullObjectListFromCommandResultMaps( resultMaps, new Function<Map<String, Object>, IProperty>() { @Override public IProperty apply(Map<String, Object> map) { return new Property(map); } } ); } PropertyDelegator(IOptionsServer server); @Override String setProperty(
            final String name,
            final String value,
            final PropertyOptions opts); @Override List<IProperty> getProperty(final GetPropertyOptions opts); @Override String deleteProperty(final String name, final PropertyOptions opts);  }
@Test public void testGetProperty() throws Exception { when(server.execMapCmdList(eq(PROPERTY.toString()), any(String[].class), eq(null))) .thenReturn(resultMaps); List<IProperty> property = propertyDelegator.getProperty(getPropertyOptions); assertThat(property.size(), is(1)); }