@Test
public void testAppendValueToUniform() {

  final PipelineInfo pipelineInfo = new PipelineInfo();
  pipelineInfo.addUniform("a", BasicType.FLOAT, Optional.empty(), Collections.singletonList(1.0));
  assertTrue(pipelineInfo.hasUniform("a"));
  final List<String> args = pipelineInfo.getArgs("a");
  assertEquals(args, Collections.singletonList("1.0"));
  final String pipelineBefore = "{\n"
      + "  \"a\": {\n"
      + "    \"func\": \"glUniform1f\",\n"
      + "    \"args\": [\n"
      + "      1.0\n"
      + "    ]\n"
      + "  }\n"
      + "}";
  assertEquals(pipelineInfo.toString(), pipelineBefore);
  final int index = pipelineInfo.appendValueToUniform("a", 2.0);
  assertEquals(index, 1);
  final List<String> args2 = pipelineInfo.getArgs("a");
  assertEquals(args2, Arrays.asList("1.0", "2.0"));
  final String pipelineAfter = "{\n"
      + "  \"a\": {\n"
      + "    \"func\": \"glUniform1f\",\n"
      + "    \"args\": [\n"
      + "      1.0,\n"
      + "      2.0\n"
      + "    ]\n"
      + "  }\n"
      + "}";
  assertEquals(pipelineInfo.toString(), pipelineAfter);
}