### Question:
AbstractCassandraProcessor extends AbstractProcessor { public static Schema getSchemaForType(String dataType) { SchemaBuilder.TypeBuilder<Schema> typeBuilder = SchemaBuilder.builder(); Schema returnSchema; switch (dataType) { case "string": returnSchema = typeBuilder.stringType(); break; case "boolean": returnSchema = typeBuilder.booleanType(); break; case "int": returnSchema = typeBuilder.intType(); break; case "long": returnSchema = typeBuilder.longType(); break; case "float": returnSchema = typeBuilder.floatType(); break; case "double": returnSchema = typeBuilder.doubleType(); break; case "bytes": returnSchema = typeBuilder.bytesType(); break; default: throw new IllegalArgumentException("Unknown Avro primitive type: " + dataType); } return returnSchema; }  void stop(); static Schema getUnionFieldType(String dataType); static Schema getSchemaForType(String dataType); static String getPrimitiveAvroTypeFromCassandraType(DataType dataType); static DataType getPrimitiveDataTypeFromString(String dataTypeName); List<InetSocketAddress> getContactPoints(String contactPointList); static final int DEFAULT_CASSANDRA_PORT; static final PropertyDescriptor CONTACT_POINTS; static final PropertyDescriptor KEYSPACE; static final PropertyDescriptor PROP_SSL_CONTEXT_SERVICE; static final PropertyDescriptor CLIENT_AUTH; static final PropertyDescriptor USERNAME; static final PropertyDescriptor PASSWORD; static final PropertyDescriptor CONSISTENCY_LEVEL; static final PropertyDescriptor CHARSET; }### Answer:
@Test public void testGetSchemaForType() throws Exception { assertEquals(AbstractCassandraProcessor.getSchemaForType("string").getType().getName(), "string"); assertEquals(AbstractCassandraProcessor.getSchemaForType("boolean").getType().getName(), "boolean"); assertEquals(AbstractCassandraProcessor.getSchemaForType("int").getType().getName(), "int"); assertEquals(AbstractCassandraProcessor.getSchemaForType("long").getType().getName(), "long"); assertEquals(AbstractCassandraProcessor.getSchemaForType("float").getType().getName(), "float"); assertEquals(AbstractCassandraProcessor.getSchemaForType("double").getType().getName(), "double"); assertEquals(AbstractCassandraProcessor.getSchemaForType("bytes").getType().getName(), "bytes"); }
@Test(expected = IllegalArgumentException.class) public void testGetSchemaForTypeBadType() throws Exception { AbstractCassandraProcessor.getSchemaForType("nothing"); }