@Test
public void testErrors() {

  try {
    DynamicSpec.parseRules(null);
    fail("Expected NullPointerException");
  }
  catch (final NullPointerException e) {
  }
  try {
    DynamicSpec.parseRules("");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("#toString:java.lang.String");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#:java.lang.String");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#toString()::");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#():java.lang.String");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#toString():java.lang.String:");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#wait():<void>:~java.lang.Exception");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#<init>():<void>");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#<clinit>():<void>");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
  try {
    DynamicSpec.parseRules("java.lang.Object#<clinit>()");
    fail("Expected IllegalArgumentException");
  }
  catch (final IllegalArgumentException e) {
  }
}