@Test(expected = IllegalStateException.class)
public void testCreateTableTableAlreadyExistsIncorrectKeySchema() {

    final Collection<AttributeDefinition> ads = Arrays.asList(new AttributeDefinition("Hash", ScalarAttributeType.S));
    final Collection<KeySchemaElement> kses = Arrays.asList(new KeySchemaElement("Hash", KeyType.HASH));
    final TableDescription description = new TableDescription().withAttributeDefinitions(ads).withKeySchema(kses)
        .withTableName(tableName);
    final DescribeTableResult result = new DescribeTableResult().withTable(description);
    EasyMock.expect(dynamoDB.describeTable(tableName)).andReturn(result);
    final Collection<AttributeDefinition> ads2 = Arrays.asList(new AttributeDefinition("Hash2", ScalarAttributeType.S));
    final Collection<KeySchemaElement> kses2 = Arrays.asList(new KeySchemaElement("Hash2", KeyType.HASH));
    final CreateTableRequest request = new CreateTableRequest().withAttributeDefinitions(ads2).withKeySchema(kses2)
        .withTableName(tableName);
    PowerMock.replayAll();
    DynamoDBManager.createTable(dynamoDB, request);
}