ComputationTargetRequirement extends ComputationTargetReference { public static ComputationTargetRequirement of(final ExternalId identifier) { return new ComputationTargetRequirement(ComputationTargetType.PRIMITIVE, identifier); } ComputationTargetRequirement(final ComputationTargetType targetType, final ExternalId id);  ComputationTargetRequirement(final ComputationTargetType targetType, final ExternalIdBundle bundle);   ComputationTargetRequirement(final ComputationTargetType targetType, final ExternalIdBundle bundle, final ComputationTargetReference parent); private  ComputationTargetRequirement(final ComputationTargetReference parent, final ComputationTargetType type, final ExternalIdBundle identifiers); static ComputationTargetRequirement of(final ExternalId identifier); static ComputationTargetRequirement of(final ExternalIdBundle bundle); ExternalIdBundle getIdentifiers(); @Override ComputationTargetRequirement getRequirement(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); @Override T accept(final ComputationTargetReferenceVisitor<T> visitor);  }
@Test(expectedExceptions = {AssertionError.class }) public void testConstructor_id_invalidType_1() { new ComputationTargetRequirement(ComputationTargetType.POSITION.containing(ComputationTargetType.SECURITY), ExternalId.of("Foo", "Bar")); }
@Test(expectedExceptions = {AssertionError.class }) public void testConstructor_id_invalidType_2() { new ComputationTargetRequirement(null, ExternalId.of("Foo", "Bar")); }
@Test(expectedExceptions = {IllegalArgumentException.class }) public void testConstructor_id_null_invalid_2() { new ComputationTargetRequirement(ComputationTargetType.NULL, ExternalId.of("Foo", "Bar")); }
@Test(expectedExceptions = {AssertionError.class }) public void testConstructor_bundle_invalidType_1() { new ComputationTargetRequirement(ComputationTargetType.POSITION.containing(ComputationTargetType.SECURITY), ExternalIdBundle.of(ExternalId.of("Foo", "1"), ExternalId.of("Bar", "2"))); }
@Test(expectedExceptions = {AssertionError.class }) public void testConstructor_bundle_invalidType_2() { new ComputationTargetRequirement(null, ExternalIdBundle.of(ExternalId.of("Foo", "1"), ExternalId.of("Bar", "2"))); }
@Test(expectedExceptions = {IllegalArgumentException.class }) public void testConstructor_bundle_null_invalid_2() { new ComputationTargetRequirement(ComputationTargetType.NULL, ExternalIdBundle.of(ExternalId.of("Foo", "1"), ExternalId.of("Bar", "2"))); }