Mascot { public List<AuthenticatedElement> input(List<FieldElement> rawElements) { return elementGeneration.input(rawElements); } Mascot(MascotResourcePool resourcePool, Network network, FieldElement macKeyShare); List<MultiplicationTriple> getTriples(int numTriples); List<AuthenticatedElement> input(List<FieldElement> rawElements); List<AuthenticatedElement> input(Integer inputterId, int numElements); List<AuthenticatedElement> getRandomElements(int numElements); List<InputMask> getInputMasks(Integer maskerId, int numMasks); List<AuthenticatedElement> getRandomBits(int numBits);  }
@Test public void testInput() { initContexts(2); FieldElement input = getFieldDefinition().createElement(12345); List<Callable<List<AuthenticatedElement>>> tasks = new ArrayList<>(); tasks.add(() -> runInputter(contexts.get(1), macKeyShareOne, Collections.singletonList(input))); tasks.add(() -> runNonInputter(contexts.get(2), macKeyShareTwo, 1, 1)); List<List<AuthenticatedElement>> results = testRuntime.runPerPartyTasks(tasks); assertEquals(results.get(0).size(), 1); assertEquals(results.get(1).size(), 1); List<AuthenticatedElement> combined = Addable.sumRows(results); FieldElement actualRecombinedValue = combined.get(0).getShare(); FieldElement actualRecombinedMac = combined.get(0).getMac(); CustomAsserts.assertEquals(getFieldDefinition(), input, actualRecombinedValue); FieldElement expectedMac = input.multiply(macKeyShareOne.add(macKeyShareTwo)); CustomAsserts.assertEquals(getFieldDefinition(), expectedMac, actualRecombinedMac); }