ElementaryOperator extends Operator<Self> { @SuppressWarnings("unchecked") protected Class<? extends Stub> getStubClass() { for (final Class<?> stubClass : this.getClass().getDeclaredClasses()) if ((stubClass.getModifiers() & Modifier.STATIC) != 0 && Stub.class.isAssignableFrom(stubClass)) return (Class<? extends Stub>) stubClass; return null; } ElementaryOperator();  ElementaryOperator(final int minInputs, final int maxInputs);  ElementaryOperator(final int inputs); EvaluationExpression getResultProjection(); @Property @Name(preposition = "into") void setResultProjection(final EvaluationExpression resultProjection); Self withResultProjection(final EvaluationExpression resultProjection); @SuppressWarnings("unchecked") List<? extends EvaluationExpression> getKeyExpressions(
			final int inputIndex); @Property(hidden = true) void setKeyExpressions(final int inputIndex,
			final List<? extends EvaluationExpression> keyExpressions); void setKeyExpressions(final int index,
			final EvaluationExpression... keyExpressions); Self withKeyExpression(final int index,
			final EvaluationExpression... keyExpressions); Self withKeyExpressions(final int index,
			final List<? extends EvaluationExpression> keyExpressions); @Override PactModule asPactModule(final EvaluationContext context); @Override ElementarySopremoModule asElementaryOperators(final EvaluationContext context); List<List<? extends EvaluationExpression>> getAllKeyExpressions(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }
@Test public void getStubClassShouldReturnNullIfNoStub() { assertEquals(null, new OperatorWithNoStubs().getStubClass()); }
@SuppressWarnings("unchecked") @Test public void getStubClassShouldReturnTheFirstStub() { final Class<? extends eu.stratosphere.pact.common.stubs.Stub> stubClass = new OperatorWithTwoStubs() .getStubClass(); assertEquals(OperatorWithTwoStubs.class, stubClass.getDeclaringClass()); assertTrue(Arrays.asList(OperatorWithTwoStubs.Implementation1.class, OperatorWithTwoStubs.Implementation2.class).contains(stubClass)); }
@Test public void getStubClassShouldReturnTheOnlyStub() { assertEquals(OperatorWithOneStub.Implementation.class, new OperatorWithOneStub().getStubClass()); }