final UniqueId uniqueId = UniqueId.of("foo", "bar");
_batchMaster.getDbConnector().getTransactionTemplate().execute(new TransactionCallback<Void>() {
@Override
public Void doInTransaction(final TransactionStatus status) {
final HbComputationTargetSpecification portfolio = _batchWriter.getOrCreateComputationTargetInTransaction(
new ComputationTargetSpecification(ComputationTargetType.PORTFOLIO_NODE, uniqueId));
assertNotNull(portfolio);
assertEquals(ComputationTargetType.PORTFOLIO_NODE, portfolio.getType());
assertEquals(uniqueId, portfolio.getUniqueId());
final HbComputationTargetSpecification position = _batchWriter.getComputationTargetIntransaction(
new ComputationTargetSpecification(ComputationTargetType.POSITION, uniqueId));
assertNull(position);
final HbComputationTargetSpecification security = _batchWriter.getComputationTargetIntransaction(
new ComputationTargetSpecification(ComputationTargetType.SECURITY, uniqueId));
assertNull(security);
final HbComputationTargetSpecification primitive = _batchWriter.getComputationTargetIntransaction(
new ComputationTargetSpecification(ComputationTargetType.PRIMITIVE, uniqueId));
assertNull(primitive);
return null;