DescribeDelegator extends BaseDelegator implements IDescribeDelegator { @Override public InputStream getChangelistDiffs(final int changelistId, final GetChangelistDiffsOptions opts) throws P4JavaException { return execStreamCmd(DESCRIBE, processParameters(opts, null, String.valueOf(changelistId), server)); } DescribeDelegator(IOptionsServer server); @Override InputStream getChangelistDiffs(final int changelistId,
	                                      final GetChangelistDiffsOptions opts); @Override InputStream getChangelistDiffsStream(final int id, final DescribeOptions options); @Override List<IFileSpec> getShelvedFiles(final int changelistId); InputStream getChangelistDiffs(final int id, final DiffType diffType); List<IFileSpec> getChangelistFiles(final int id); List<IFileSpec> getCommitFiles(final String repo, final String commit);  }
@Test public void testInputStreamDiffs() throws P4JavaException { InputStream mockInputStream = mock(InputStream.class); when(server.execStreamCmd(eq(DESCRIBE.toString()), argThat(new CommandLineArgumentMatcher(new String[] { "10" })))) .thenReturn(mockInputStream); InputStream changelistInputStream = describeDelegator.getChangelistDiffs(10, new GetChangelistDiffsOptions()); assertEquals(mockInputStream, changelistInputStream); }